From c4541e634b3e5e2b115604d0c525946bd8ee0412 Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Tue, 23 Jul 2024 10:42:36 +0200 Subject: [PATCH] - Fix uninitialized variable warning in create_tcp_accept_sock. --- doc/Changelog | 1 + services/listen_dnsport.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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; -- 2.47.3