]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Use the z-option to printf %d for size_t printf. z is supported by the
authorDaniel Stenberg <daniel@haxx.se>
Mon, 1 Mar 2004 12:45:12 +0000 (12:45 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 1 Mar 2004 12:45:12 +0000 (12:45 +0000)
libcurl *printf and by Linux printf(). This should make the code work nicely
even for 64bit size_ts.

src/main.c

index bda7f2b19873bb362085f69b397af260bae97396..ffe6ba8548bd46898954aaf79b4777fa3fc7b2e4 100644 (file)
@@ -2427,11 +2427,11 @@ void dump(const char *text,
     /* without the hex output, we can fit more on screen */
     width = 0x40;
 
-  fprintf(stream, "%s, %d bytes (0x%x)\n", text, size, size);
+  fprintf(stream, "%s, %zd bytes (0x%zx)\n", text, size, size);
 
   for(i=0; i<size; i+= width) {
 
-    fprintf(stream, "%04x: ", i);
+    fprintf(stream, "%04zx: ", i);
 
     if(!nohex) {
       /* hex not disabled, show it */