From 9faef1e391a90d8c69d6f5aeeacbc6b995cc12d8 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 27 Apr 2017 17:54:58 +0200 Subject: [PATCH] MINOR: tools: make debug_hexdump() use a const char for the string There's no reason the string to be dumped should be a char *, it's a const. --- include/common/standard.h | 2 +- src/standard.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/common/standard.h b/include/common/standard.h index 7de8ead28..9447e3669 100644 --- a/include/common/standard.h +++ b/include/common/standard.h @@ -1081,7 +1081,7 @@ char *env_expand(char *in); /* displays a long memory block at , assuming first byte of * has address . The output is emitted to file . */ -void debug_hexdump(FILE *out, char *buf, unsigned int baseaddr, int len); +void debug_hexdump(FILE *out, const char *buf, unsigned int baseaddr, int len); /* used from everywhere just to drain results we don't want to read and which * recent versions of gcc increasingly and annoyingly complain about. diff --git a/src/standard.c b/src/standard.c index 95d83e49c..1d7625486 100644 --- a/src/standard.c +++ b/src/standard.c @@ -3782,7 +3782,7 @@ int dump_text_line(struct chunk *out, const char *buf, int bsize, int len, /* displays a long memory block at , assuming first byte of * has address . The output is emitted to file . */ -void debug_hexdump(FILE *out, char *buf, unsigned int baseaddr, int len) +void debug_hexdump(FILE *out, const char *buf, unsigned int baseaddr, int len) { unsigned int i; int b, j;