[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r18790: {torperf} Be more correct when specifying printf format codes (thanks (torperf/trunk)
Author: sjm217
Date: 2009-03-06 13:13:46 -0500 (Fri, 06 Mar 2009)
New Revision: 18790
Modified:
torperf/trunk/trivsocks-client.c
Log:
Be more correct when specifying printf format codes (thanks nickm, phobos)
Modified: torperf/trunk/trivsocks-client.c
===================================================================
--- torperf/trunk/trivsocks-client.c 2009-03-06 12:23:01 UTC (rev 18789)
+++ torperf/trunk/trivsocks-client.c 2009-03-06 18:13:46 UTC (rev 18790)
@@ -105,9 +105,9 @@
fprintf(stderr, "Nonzero port in socks response: bad format.\n");
return -1;
}
- fprintf(stderr,"Port number: %d\n", get_uint16(response+2));
+ fprintf(stderr, "Port number: %u\n", (unsigned)get_uint16(response+2));
if (status != 90) {
- fprintf(stderr, "Got status response '%d': socks request failed.\n", status);
+ fprintf(stderr, "Got status response '%u': socks request failed.\n", (unsigned)status);
return -1;
}
@@ -162,7 +162,7 @@
return -1;
}
port = ntohl(get_uint16(reply_buf));
- fprintf(stderr,"Port number: %d\n", port);
+ fprintf(stderr,"Port number: %u\n", (unsigned)port);
return 0;
}
@@ -402,7 +402,7 @@
print_time(dataresponsetime);
print_time(datacompletetime);
- printf("%d %d\n", write_bytes, read_bytes);
+ printf("%lu %lu\n", (unsigned long)write_bytes, (unsigned long)read_bytes);
return 0;
}