diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-18 18:41:20 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-19 08:11:46 +0200 |
commit | 67521b5ecf0e3b0d8ea5278b02400811715069be (patch) | |
tree | b8963f3895eb50192c272b3a4bc5a09fa8cddf08 /lib/hostip6.c | |
parent | dbc5c1773845f9244d6c9a73f7a1069619322ddc (diff) | |
download | curl-67521b5ecf0e3b0d8ea5278b02400811715069be.tar.gz |
hostip: make Curl_printable_address not return anything
It was not used much anyway and instead we let it store a blank buffer
in case of failure.
Reported-by: MonocleAI
Fixes #5411
Closes #5418
Diffstat (limited to 'lib/hostip6.c')
-rw-r--r-- | lib/hostip6.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/hostip6.c b/lib/hostip6.c index 9b7d17f80..11215758d 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -111,13 +111,8 @@ static void dump_addrinfo(struct connectdata *conn, 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 |