[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 165/178: lib: Fix format specifiers
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 165/178: lib: Fix format specifiers |
Date: |
Wed, 23 May 2018 12:26:40 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit eb49683e5591900b0c79fd9649a5aaf5549ea61f
Author: Rikard Falkeborn <address@hidden>
AuthorDate: Sun May 6 20:32:24 2018 +0200
lib: Fix format specifiers
---
lib/ftp.c | 4 ++--
lib/http.c | 4 ++--
lib/http_proxy.c | 4 ++--
lib/url.c | 2 +-
lib/vtls/mbedtls.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/lib/ftp.c b/lib/ftp.c
index 5c99d80c4..4e074a111 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -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;
diff --git a/lib/http.c b/lib/http.c
index e080ae513..ff1d6813a 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -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?"]":"",
diff --git a/lib/http_proxy.c b/lib/http_proxy.c
index c1eb177dd..e10a48829 100644
--- a/lib/http_proxy.c
+++ b/lib/http_proxy.c
@@ -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);
diff --git a/lib/url.c b/lib/url.c
index 38f08b3c6..701f83ab3 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -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,
diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c
index 4ec9fa18e..d7759dc84 100644
--- a/lib/vtls/mbedtls.c
+++ b/lib/vtls/mbedtls.c
@@ -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);
}
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 141/178: docs: remove extraneous commas in man pages, (continued)
- [GNUnet-SVN] [gnurl] 141/178: docs: remove extraneous commas in man pages, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 170/178: CODE_STYLE: mention return w/o parens, but sizeof with, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 168/178: tool: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 175/178: docs/libcurl/index.html: removed, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 164/178: contributors.sh: use "on github", not at, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 163/178: http2: getsock fix for uploads, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 162/178: pingpong: fix response cache memcpy overflow, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 172/178: gcc: disable picky gcc-8 function pointer warnings in two places, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 173/178: http2: use easy handle of stream for logging, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 135/178: CURLOPT_URL.3: add ENCODING section [ci skip], gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 165/178: lib: Fix format specifiers,
gnunet <=
- [GNUnet-SVN] [gnurl] 169/178: examples: Fix format specifiers, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 158/178: setup_transfer: deal with both sockets being -1, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 178/178: Merge tag 'curl-7_60_0' (with fixes), gnunet, 2018/05/23