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.
This commit is contained in:
Willy Tarreau 2017-04-27 17:54:58 +02:00
parent 577d5ac8ae
commit 9faef1e391
2 changed files with 2 additions and 2 deletions

View File

@ -1081,7 +1081,7 @@ char *env_expand(char *in);
/* displays a <len> long memory block at <buf>, assuming first byte of <buf>
* has address <baseaddr>. The output is emitted to file <out>.
*/
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.

View File

@ -3782,7 +3782,7 @@ int dump_text_line(struct chunk *out, const char *buf, int bsize, int len,
/* displays a <len> long memory block at <buf>, assuming first byte of <buf>
* has address <baseaddr>. The output is emitted to file <out>.
*/
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;