diff options
author | Yang Tse <yangsita@gmail.com> | 2009-05-13 04:16:00 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2009-05-13 04:16:00 +0000 |
commit | 843f73ecaa4a83ef75421efda5bae29a1da07cb7 (patch) | |
tree | 2abe1b4fb5f650eb79c18febf7d18deea613b51d | |
parent | 86f043a66c0aee8ab152b5fc5e4ada0ca64052b2 (diff) |
fix print formatting-string directives
-rw-r--r-- | tests/server/sockfilt.c | 6 |
1 files 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)) |