]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
utils/cache_gc: fix debug prints
authorVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 30 Nov 2020 08:06:22 +0000 (09:06 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 30 Nov 2020 08:06:22 +0000 (09:06 +0100)
The difference is on "negative" char values, in which case
the prints were way too long.

utils/cache_gc/db.c

index 0ab829b9e95459b48246afc08316b0df46e02909..e0ee43df1544d7c1e75d00c90fb0311ebcca926a 100644 (file)
@@ -128,7 +128,7 @@ void debug_printbin(const char *str, unsigned int len)
                if (isprint(c))
                        putchar(c);
                else
-                       printf("`%02x`", c);
+                       printf("`%02hhx`", c);
        }
        putchar('"');
 }