mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 00:58:48 -05:00
lib: Fix format specifiers
This commit is contained in:
parent
4062bc4d3e
commit
eb49683e55
@ -1910,13 +1910,13 @@ static CURLcode ftp_state_pasv_resp(struct connectdata *conn,
|
||||
if(data->set.ftp_skip_ip) {
|
||||
/* told to ignore the remotely given IP but instead use the host we used
|
||||
for the control connection */
|
||||
infof(data, "Skip %d.%d.%d.%d for data connection, re-use %s instead\n",
|
||||
infof(data, "Skip %u.%u.%u.%u for data connection, re-use %s instead\n",
|
||||
ip[0], ip[1], ip[2], ip[3],
|
||||
conn->host.name);
|
||||
ftpc->newhost = strdup(control_address(conn));
|
||||
}
|
||||
else
|
||||
ftpc->newhost = aprintf("%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]);
|
||||
ftpc->newhost = aprintf("%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]);
|
||||
|
||||
if(!ftpc->newhost)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
@ -1407,7 +1407,7 @@ static CURLcode add_haproxy_protocol_header(struct connectdata *conn)
|
||||
|
||||
snprintf(proxy_header,
|
||||
sizeof proxy_header,
|
||||
"PROXY %s %s %s %i %i\r\n",
|
||||
"PROXY %s %s %s %li %li\r\n",
|
||||
tcp_version,
|
||||
conn->data->info.conn_local_ip,
|
||||
conn->data->info.conn_primary_ip,
|
||||
@ -2132,7 +2132,7 @@ CURLcode Curl_http(struct connectdata *conn, bool *done)
|
||||
host,
|
||||
conn->bits.ipv6_ip?"]":"");
|
||||
else
|
||||
conn->allocptr.host = aprintf("Host: %s%s%s:%hu\r\n",
|
||||
conn->allocptr.host = aprintf("Host: %s%s%s:%d\r\n",
|
||||
conn->bits.ipv6_ip?"[":"",
|
||||
host,
|
||||
conn->bits.ipv6_ip?"]":"",
|
||||
|
@ -221,7 +221,7 @@ static CURLcode CONNECT(struct connectdata *conn,
|
||||
if(!req_buffer)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
host_port = aprintf("%s:%hu", hostname, remote_port);
|
||||
host_port = aprintf("%s:%d", hostname, remote_port);
|
||||
if(!host_port) {
|
||||
Curl_add_buffer_free(req_buffer);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
@ -245,7 +245,7 @@ static CURLcode CONNECT(struct connectdata *conn,
|
||||
if(hostname != conn->host.name)
|
||||
ipv6_ip = (strchr(hostname, ':') != NULL);
|
||||
hostheader = /* host:port with IPv6 support */
|
||||
aprintf("%s%s%s:%hu", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"",
|
||||
aprintf("%s%s%s:%d", ipv6_ip?"[":"", hostname, ipv6_ip?"]":"",
|
||||
remote_port);
|
||||
if(!hostheader) {
|
||||
Curl_add_buffer_free(req_buffer);
|
||||
|
@ -3419,7 +3419,7 @@ static CURLcode parse_remote_port(struct Curl_easy *data,
|
||||
* stripped off. It would be better to work directly from the original
|
||||
* URL and simply replace the port part of it.
|
||||
*/
|
||||
url = aprintf("%s://%s%s%s:%hu%s%s%s", conn->given->scheme,
|
||||
url = aprintf("%s://%s%s%s:%d%s%s%s", conn->given->scheme,
|
||||
conn->bits.ipv6_ip?"[":"", conn->host.name,
|
||||
conn->bits.ipv6_ip?"]":"", conn->remote_port,
|
||||
data->state.slash_removed?"/":"", data->state.path,
|
||||
|
@ -815,7 +815,7 @@ static void Curl_mbedtls_session_free(void *ptr)
|
||||
static size_t Curl_mbedtls_version(char *buffer, size_t size)
|
||||
{
|
||||
unsigned int version = mbedtls_version_get_number();
|
||||
return snprintf(buffer, size, "mbedTLS/%d.%d.%d", version>>24,
|
||||
return snprintf(buffer, size, "mbedTLS/%u.%u.%u", version>>24,
|
||||
(version>>16)&0xff, (version>>8)&0xff);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user