]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
hostip: skip error check for infallible function call
authorCMD <80255379+iCMDdev@users.noreply.github.com>
Wed, 10 Jul 2024 10:16:29 +0000 (13:16 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 10 Jul 2024 14:14:06 +0000 (16:14 +0200)
Closes #14147

lib/hostip.c

index 122e07ec98170a2a2ca3fcaea0c8934d5f80fe39..2c1f08e7446c11224eb9f776edb3bfdf2e20e9dd 100644 (file)
@@ -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;