mirror of
https://github.com/curl/curl.git
synced 2025-01-24 14:15:18 +08:00
fix print formatting-string directives
This commit is contained in:
parent
86f043a66c
commit
843f73ecaa
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user