]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib/adnss: clang: Fix The left operand of '!=' is a garbage value
authorNoel Power <noel.power@suse.com>
Tue, 9 Jul 2019 14:08:49 +0000 (14:08 +0000)
committerGary Lockyer <gary@samba.org>
Wed, 24 Jul 2019 21:33:20 +0000 (21:33 +0000)
Fixes:

lib/addns/dnssock.c:143:3: warning: The left operand of '!=' is a garbage value <--[clang]
                TALLOC_FREE(conn);
                ^
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/addns/dnssock.c

index 30b8fa2eaf44dbefd43d9745c0d675fb1f3753c7..11f2e00a57b5f772a9ffe2ecbdf8415100ce58f3 100644 (file)
@@ -125,7 +125,7 @@ static DNS_ERROR dns_udp_open( const char *nameserver,
 {
        struct addrinfo hints;
        struct sockaddr_storage RecvAddr;
-       struct dns_connection *conn;
+       struct dns_connection *conn = NULL;
        DNS_ERROR dns_ret;
        socklen_t RecvAddrLen;
        char service[16];