s3/libsmb: clang: Fix 'The left operand of '!=' is a garbage value'
authorNoel Power <noel.power@suse.com>
Wed, 14 Aug 2019 10:25:19 +0000 (11:25 +0100)
committerGary Lockyer <gary@samba.org>
Tue, 27 Aug 2019 23:04:37 +0000 (23:04 +0000)
Fixes:

source3/libsmb/clifile.c:789:15: warning: The left operand of '!=' is a garbage value <--[clang]
        if (num_data != 100) {
            ~~~~~~~~ ^

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

index e696b536093aca657bd9ed67d9da8e57d0348c05..486fec01cf8e125e3c243d39d4ff092dccfd5476 100644 (file)
@@ -777,7 +777,7 @@ static void cli_posix_stat_done(struct tevent_req *subreq)
        struct stat_state *state = tevent_req_data(req, struct stat_state);
        SMB_STRUCT_STAT *sbuf = state->sbuf;
        uint8_t *data;
-       uint32_t num_data;
+       uint32_t num_data = 0;
        NTSTATUS status;
 
        status = cli_qpathinfo_recv(subreq, state, &data, &num_data);