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 015f1c7de4

Pointed out by CodeSonar

Closes #20900
This commit is contained in:
Daniel Stenberg 2026-03-12 07:59:50 +01:00
parent 2938cb72e5
commit c0f17dee36
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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));