]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tools: make debug_hexdump() use a const char for the string
authorWilly Tarreau <w@1wt.eu>
Thu, 27 Apr 2017 15:54:58 +0000 (17:54 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Jun 2017 13:49:31 +0000 (15:49 +0200)
There's no reason the string to be dumped should be a char *, it's
a const.

include/common/standard.h
src/standard.c

index 7de8ead2848f05dcff71bfd136172c26f1b6c682..9447e3669699dd19aaffec33c47b6b46f063b5d3 100644 (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.
index 95d83e49c26927134a8bd8a6001461731e08269d..1d7625486ad03c986a128e56f2e9d610401a4357 100644 (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;