changeset 146:0d2a46526349

Portability fixes.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 05 Jan 2015 22:39:50 +0200
parents fdea1c3acc53
children 0a085e2e8bf5
files th_network.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/th_network.c	Thu Jan 01 09:22:27 2015 +0200
+++ b/th_network.c	Mon Jan 05 22:39:50 2015 +0200
@@ -943,8 +943,8 @@
     
     fprintf(f,
     "\n--------------------------------------------------------------\n"
-    "err=%d, status=%d, got_bytes=%d, total_bytes=%d\n"
-    "buf=0x%p, in_ptr=0x%04x, ptr=0x%04x\n",
+    "err=%d, status=%d, got_bytes=%zd, total_bytes=%zd\n"
+    "buf=0x%p, in_ptr=0x%04zx, ptr=0x%04zx\n",
     conn->err, conn->status, conn->base.got_bytes, conn->base.total_bytes,
     conn->base.buf, conn->base.in_ptr - conn->base.buf, conn->base.ptr - conn->base.buf);
     
@@ -956,7 +956,7 @@
         left -= amount;
 
         // Dump offs | xx xx xx xx | and fill string
-        fprintf(f, "%04x | ", offs);
+        fprintf(f, "%04zx | ", offs);
         for (bufoffs = 0; bufoffs < amount; offs++, bufoffs++, p++)
         {
             fprintf(f, "%02x ", *p);