libcli/smb: clang: Fix Value stored to 'next_offset' is never read
authorNoel Power <noel.power@suse.com>
Tue, 9 Jul 2019 14:04:34 +0000 (14:04 +0000)
committerGary Lockyer <gary@samba.org>
Wed, 24 Jul 2019 21:33:20 +0000 (21:33 +0000)
Fixes:

ibcli/smb/smb2_negotiate_context.c:117:3: warning: Value stored to 'next_offset' is never read <--[clang]
                next_offset += next_pad;
                ^              ~~~~~~~~
1 warning generated.

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

index ac4a08e891076c98b06c8847fffd286f354636f4..f9c98fcf805ef0dfdd90165b0b9957042f85a93a 100644 (file)
@@ -114,7 +114,6 @@ static NTSTATUS smb2_negotiate_context_push_one(TALLOC_CTX *mem_ctx, DATA_BLOB *
        memcpy(buffer->data+ofs+0x08, context->data.data, context->data.length);
        if (next_pad > 0) {
                memset(buffer->data+ofs+next_offset, 0, next_pad);
-               next_offset += next_pad;
        }
 
        return NT_STATUS_OK;