Merge branch 'master' of git://github.com/chunkeey/carl9170fw
[carl9170fw.git] / tools / carlu / src / debug.c
index 5721008cef052c8acdca545f9ee401fd663acfae..f8d6372c5afa184b39100a9bec55b32112f67152 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * carl9170user - userspace testing utility for ar9170 devices
+ * carlu - userspace testing utility for ar9170 devices
  *
  * Random assortment of debug stuff
  *
- * Copyright 2009, 2010 Christian Lamparter <chunkeey@googlemail.com>
+ * Copyright 2009-2011 Christian Lamparter <chunkeey@googlemail.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -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, "   ");
                }