diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2020-06-23 21:41:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-24 11:55:09 (GMT) |
commit | 5717fdc114a704cddae629e20e6588191360e98a (patch) | |
tree | 36545299412c5cafb4d3e3eb464598af465ea4c8 /lib/hostip6.c | |
parent | 735ea3001ae98636a4cb7caf15a40960c0da39a1 (diff) | |
download | CMake-5717fdc114a704cddae629e20e6588191360e98a.zip CMake-5717fdc114a704cddae629e20e6588191360e98a.tar.gz CMake-5717fdc114a704cddae629e20e6588191360e98a.tar.bz2 |
curl 2020-06-23 (e9db32a0)
Code extracted from:
https://github.com/curl/curl.git
at commit e9db32a09af03f27e86d1251a9e68e9b7486d371 (curl-7_71_0).
Diffstat (limited to 'lib/hostip6.c')
-rw-r--r-- | lib/hostip6.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/hostip6.c b/lib/hostip6.c index 41ff986..1121575 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -103,20 +103,16 @@ bool Curl_ipvalid(struct connectdata *conn) #if defined(CURLRES_SYNCH) #ifdef DEBUG_ADDRINFO -static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai) +static void dump_addrinfo(struct connectdata *conn, + const struct Curl_addrinfo *ai) { printf("dump_addrinfo:\n"); for(; ai; ai = ai->ai_next) { char buf[INET6_ADDRSTRLEN]; printf(" fam %2d, CNAME %s, ", ai->ai_family, ai->ai_canonname ? ai->ai_canonname : "<none>"); - if(Curl_printable_address(ai, buf, sizeof(buf))) - printf("%s\n", buf); - else { - char buffer[STRERROR_LEN]; - printf("failed; %s\n", - Curl_strerror(SOCKERRNO, buffer, sizeof(buffer))); - } + Curl_printable_address(ai, buf, sizeof(buf)); + printf("%s\n", buf); } } #else @@ -132,13 +128,13 @@ static void dump_addrinfo(struct connectdata *conn, const Curl_addrinfo *ai) * memory we need to free after use. That memory *MUST* be freed with * Curl_freeaddrinfo(), nothing else. */ -Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, - const char *hostname, - int port, - int *waitp) +struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, + const char *hostname, + int port, + int *waitp) { struct addrinfo hints; - Curl_addrinfo *res; + struct Curl_addrinfo *res; int error; char sbuf[12]; char *sbufptr = NULL; |