From: W.C.A. Wijngaards Date: Tue, 23 Jul 2024 08:42:36 +0000 (+0200) Subject: - Fix uninitialized variable warning in create_tcp_accept_sock. X-Git-Tag: release-1.21.0rc1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4541e634b3e5e2b115604d0c525946bd8ee0412;p=thirdparty%2Funbound.git - Fix uninitialized variable warning in create_tcp_accept_sock. --- diff --git a/doc/Changelog b/doc/Changelog index 45099106d..5315a8e4b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -8,6 +8,7 @@ - Fix compile when the compiler does not support the noreturn attribute. - Fix to have empty definition when not supported for weak attribute. + - Fix uninitialized variable warning in create_tcp_accept_sock. 19 July 2024: Wouter - Add dnstap-sample-rate that logs only 1/N messages, for high volume diff --git a/services/listen_dnsport.c b/services/listen_dnsport.c index 7eb59a161..6c0691f2a 100644 --- a/services/listen_dnsport.c +++ b/services/listen_dnsport.c @@ -675,7 +675,7 @@ create_tcp_accept_sock(struct addrinfo *addr, int v6only, int* noproto, int* reuseport, int transparent, int mss, int nodelay, int freebind, int use_systemd, int dscp) { - int s; + int s = -1; char* err; #if defined(SO_REUSEADDR) || defined(SO_REUSEPORT) || defined(IPV6_V6ONLY) || defined(IP_TRANSPARENT) || defined(IP_BINDANY) || defined(IP_FREEBIND) || defined(SO_BINDANY) int on = 1;