From c0f17dee36f4a3e9307c2fe30c9b884fd4cdd294 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 12 Mar 2026 07:59:50 +0100 Subject: [PATCH] hostip: remove two zero assigns after memset clear As the struct is now always unconditionally memset with zeros, we can remove two zero assigns. Follow-up to 015f1c7de40839b6681b7dde7 Pointed out by CodeSonar Closes #20900 --- lib/hostip.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/hostip.c b/lib/hostip.c index 135c02b718..65cce061a0 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -683,10 +683,6 @@ static struct Curl_addrinfo *get_localhost6(int port, const char *name) memset(&sa6, 0, sizeof(sa6)); sa6.sin6_family = AF_INET6; sa6.sin6_port = htons(port16); - sa6.sin6_flowinfo = 0; -#ifdef HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID - sa6.sin6_scope_id = 0; -#endif (void)curlx_inet_pton(AF_INET6, "::1", ipv6); memcpy(&sa6.sin6_addr, ipv6, sizeof(ipv6));