diff options
Diffstat (limited to 'src/debug.c')
-rw-r--r-- | src/debug.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c index ecd7be11d..0a35dbccc 100644 --- a/src/debug.c +++ b/src/debug.c @@ -77,7 +77,7 @@ void debug_parse_category_mask(const char *_mask) if (strcasecmp(debug_info[i].name, category_token) == 0) new_mask |= debug_info[i].number; } - } while (category_token = strtok(NULL, ":")); + } while ((category_token = strtok(NULL, ":"))); free(mask); @@ -120,3 +120,12 @@ void debugp(unsigned int subsys, char *file, int line, const char *format, ...) fflush(outfd); } +void hexdump(unsigned char *buf, int len) +{ + int i; + for (i = 0; i < len; i++) { + fprintf(stdout, "%02x ", buf[i]); + } + fprintf(stdout, "\n"); +} + |