From c2e427cc939a3270e528ec078334fa8ff79f180f Mon Sep 17 00:00:00 2001 From: CMD <80255379+iCMDdev@users.noreply.github.com> Date: Wed, 10 Jul 2024 13:16:29 +0300 Subject: [PATCH] hostip: skip error check for infallible function call Closes #14147 --- lib/hostip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hostip.c b/lib/hostip.c index 122e07ec98..2c1f08e744 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -536,8 +536,8 @@ static struct Curl_addrinfo *get_localhost6(int port, const char *name) sa6.sin6_port = htons(port16); sa6.sin6_flowinfo = 0; sa6.sin6_scope_id = 0; - if(Curl_inet_pton(AF_INET6, "::1", ipv6) < 1) - return NULL; + + (void)Curl_inet_pton(AF_INET6, "::1", ipv6); memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6)); ca->ai_flags = 0; -- 2.47.3