]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix uninitialized variable warning in create_tcp_accept_sock.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jul 2024 08:42:36 +0000 (10:42 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jul 2024 08:42:36 +0000 (10:42 +0200)
doc/Changelog
services/listen_dnsport.c

index 45099106da776271eaab7b43b6b41db8b4856cd1..5315a8e4b6e29329d5911963b08ff313a839fc21 100644 (file)
@@ -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
index 7eb59a1618a18487990aa28a32275e884fcabf4f..6c0691f2a73cae0a85fc7811bea32167e8938d15 100644 (file)
@@ -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;