1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-05 20:58:40 +03:00

s3/libsmb: clang: Fix 'The left operand of '>' or '<' is a garbage value

Fixes:

source3/libsmb/clireadwrite.c:601:15: warning: The left operand of '>' is a garbage value <--[clang]
        if (received > expected) {

source3/libsmb/clireadwrite.c:799:16: warning: The left operand of '<' is a garbage value <--[clang]
        if ((received < 0) || (received > state->buflen)) {
             ~~~~~~~~ ^

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
Noel Power 2019-08-14 14:42:06 +01:00 committed by Gary Lockyer
parent 78ca70925c
commit e1ef992236

View File

@ -580,7 +580,7 @@ static void cli_pull_chunk_done(struct tevent_req *subreq)
struct cli_pull_state);
NTSTATUS status;
size_t expected = chunk->total_size - chunk->tmp_size;
ssize_t received;
ssize_t received = 0;
uint8_t *buf = NULL;
chunk->subreq = NULL;