CURLOPT_DEBUGFUNCTION.3: Fix example
authorJay Satiro <raysatiro@yahoo.com>
Sat, 20 Feb 2016 21:23:05 +0000 (16:23 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Sat, 20 Feb 2016 21:23:05 +0000 (16:23 -0500)
docs/libcurl/opts/CURLOPT_DEBUGFUNCTION.3

index 9079ff2d0699cde3a33f153e61e3cb7fa23660e2..bf07499a081ff14443f36b1d7001a64820b6c94a 100644 (file)
@@ -103,8 +103,10 @@ void dump(const char *text,
     }
 
     /* show data on the right */
-    for(c = 0; (c < width) && (i+c < size); c++)
-      fputc(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.', stream);
+    for(c = 0; (c < width) && (i+c < size); c++) {
+      char x = (ptr[i+c] >= 0x20 && ptr[i+c] < 0x80) ? ptr[i+c] : '.';
+      fputc(x, stream);
+    }
 
     fputc('\\n', stream); /* newline */
   }