From: Vladimír Čunát Date: Mon, 30 Nov 2020 08:06:22 +0000 (+0100) Subject: utils/cache_gc: fix debug prints X-Git-Tag: v5.2.1~6^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6164ac91fcb7ffd96c73de75cd0cbba13492d4bd;p=thirdparty%2Fknot-resolver.git utils/cache_gc: fix debug prints The difference is on "negative" char values, in which case the prints were way too long. --- diff --git a/utils/cache_gc/db.c b/utils/cache_gc/db.c index 0ab829b9e..e0ee43df1 100644 --- a/utils/cache_gc/db.c +++ b/utils/cache_gc/db.c @@ -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('"'); }