From: Christian Lamparter Date: Fri, 11 Feb 2011 17:01:32 +0000 (+0100) Subject: carlu: fix hexdump formatting X-Git-Tag: 1.9.3~8 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=4cf28a613276f0c346415a7a0a13def26ede78db;p=carl9170fw.git carlu: fix hexdump formatting Signed-off-by: Christian Lamparter --- diff --git a/tools/carlu/src/debug.c b/tools/carlu/src/debug.c index 5721008..3da9e65 100644 --- a/tools/carlu/src/debug.c +++ b/tools/carlu/src/debug.c @@ -73,7 +73,7 @@ void print_hex_dump_bytes(const enum debug_level_t lvl, const char *pre, char str[17] = { 0 }; const unsigned char *tmp = (void *) buf; char *pbuf = line; - size_t i; + size_t i, j; for (i = 0; i < len; i++) { if (i % 16 == 0) { @@ -92,7 +92,7 @@ void print_hex_dump_bytes(const enum debug_level_t lvl, const char *pre, if ((i % 16)) { str[i % 16] = '\0'; - for (i = 0; i < (16 - (i % 16)); i++) + for (j = 0; j < (16 - (i % 16)); j++) pbuf += sprintf(pbuf, " "); }