fix print formatting-string directives

This commit is contained in:
Yang Tse 2009-05-13 04:16:00 +00:00
parent 86f043a66c
commit 843f73ecaa

View File

@ -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))