summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2025-11-22 14:50:11 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2025-11-22 14:50:11 +0100
commit80101a458f40cc35f39e890baba1a891a83009e7 (patch)
treefe10b6cb9309bef50e7458c5c203905b43529d24 /src/misc.c
parentf6709441cfabc7240dba76be79200aadcb6c037d (diff)
parent2e314136ed58b6860c667e379bef22190fe84aa2 (diff)
Update upstream source from tag 'upstream/5.2'
Update to upstream version '5.2' with Debian dir e7bb6e760b18c46422e9b351ee95d4d043b9cfac
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c14
1 files changed, 7 insertions, 7 deletions
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) ? '-' : ' ');