From 2e314136ed58b6860c667e379bef22190fe84aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 22 Nov 2025 14:50:10 +0100 Subject: New upstream version 5.2 --- src/misc.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/misc.c') diff --git a/src/misc.c b/src/misc.c index c138f23..e0f39fd 100644 --- a/src/misc.c +++ b/src/misc.c @@ -51,24 +51,24 @@ static __inline__ void hexdump_ascii(FILE *fp, unsigned char c, bool tty) fprintf(fp, "."); } -EXPORT_SYMBOL void HX_hexdump(FILE *fp, const void *vptr, unsigned int len) +EXPORT_SYMBOL void HX_hexdump(FILE *fp, const void *vptr, size_t len) { const unsigned char *ptr = vptr; - unsigned int i, j; + size_t i; bool tty = isatty(fileno(fp)); - fprintf(fp, "Dumping %u bytes\n", len); + fprintf(fp, "Dumping %zu bytes\n", len); for (i = 0; i < len / 16; ++i) { - fprintf(fp, "%04x | ", i * 16); - for (j = 0; j < 16; ++j) + fprintf(fp, "%04zx | ", i * 16); + for (unsigned int j = 0; j < 16; ++j) fprintf(fp, "%02x%c", *ptr++, (j == 7) ? '-' : ' '); ptr -= 16; fprintf(fp, "| "); - for (j = 0; j < 16; ++j) + for (unsigned int j = 0; j < 16; ++j) hexdump_ascii(fp, *ptr++, tty); fprintf(fp, "\n"); } - fprintf(fp, "%04x | ", i * 16); + fprintf(fp, "%04zx | ", i * 16); len -= i * 16; for (i = 0; i < len; ++i) fprintf(fp, "%02x%c", ptr[i], (i == 7) ? '-' : ' '); -- cgit v1.2.3