From 843f73ecaa4a83ef75421efda5bae29a1da07cb7 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 13 May 2009 04:16:00 +0000 Subject: fix print formatting-string directives --- tests/server/sockfilt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c index 8ac653c58..97e2e4ce0 100644 --- a/tests/server/sockfilt.c +++ b/tests/server/sockfilt.c @@ -558,9 +558,9 @@ static bool juggle(curl_socket_t *sockfdp, else if(!memcmp("PORT", buffer, 4)) { /* Question asking us what PORT number we are listening to. Replies to PORT with "IPv[num]/[port]" */ - sprintf((char *)buffer, "%s/%d\n", ipv_inuse, (int)port); + sprintf((char *)buffer, "%s/%hu\n", ipv_inuse, port); buffer_len = (ssize_t)strlen((char *)buffer); - snprintf(data, sizeof(data), "PORT\n%04x\n", buffer_len); + snprintf(data, sizeof(data), "PORT\n%04zx\n", buffer_len); if(!write_stdout(data, 10)) return FALSE; if(!write_stdout(buffer, buffer_len)) @@ -660,7 +660,7 @@ static bool juggle(curl_socket_t *sockfdp, return TRUE; } - snprintf(data, sizeof(data), "DATA\n%04x\n", nread_socket); + snprintf(data, sizeof(data), "DATA\n%04zx\n", nread_socket); if(!write_stdout(data, 10)) return FALSE; if(!write_stdout(buffer, nread_socket)) -- cgit v1.2.3