]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/libsmb: clang: Fix: The right operand of '<' is a garbage value
authorNoel Power <noel.power@suse.com>
Thu, 8 Aug 2019 14:15:11 +0000 (15:15 +0100)
committerGary Lockyer <gary@samba.org>
Wed, 28 Aug 2019 01:47:40 +0000 (01:47 +0000)
Fixes:

source3/libsmb/namequery.c:977:12: warning: The right operand of '<' is a garbage value <--[clang]
        for (i=0;i<count;i++) {
                  ^~~~~~

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

index f61e2507cce1b385bbda02fd7c54c52411ba5be8..4469db8b00992243197a1741f5d24eef240d1d8d 100644 (file)
@@ -931,7 +931,7 @@ bool name_status_find(const char *q_name,
        struct sockaddr_storage ss;
        struct node_status *addrs = NULL;
        struct nmb_name nname;
-       int count, i;
+       int count = 0, i;
        bool result = false;
        NTSTATUS status;