mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
libcli: Fix coverity warning in smb2cli_notify_send()
result_independent_of_operands: "(uint16_t)(recursive ? 1 : 0) >> 8" is 0 regardless of the values of its operands. This occurs as the operand of assignment. Found by Coverity. Pair-Programmed-With: Ralph Boehme <slow@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
3f1da75f3a
commit
25c4f8c561
@ -52,15 +52,18 @@ struct tevent_req *smb2cli_notify_send(TALLOC_CTX *mem_ctx,
|
||||
struct tevent_req *req, *subreq;
|
||||
struct smb2cli_notify_state *state;
|
||||
uint8_t *fixed;
|
||||
uint16_t watch_tree;
|
||||
|
||||
req = tevent_req_create(mem_ctx, &state,
|
||||
struct smb2cli_notify_state);
|
||||
if (req == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
watch_tree = recursive ? SMB2_WATCH_TREE : 0;
|
||||
fixed = state->fixed;
|
||||
SSVAL(fixed, 0, 32);
|
||||
SSVAL(fixed, 2, recursive ? SMB2_WATCH_TREE : 0);
|
||||
SSVAL(fixed, 2, watch_tree);
|
||||
SIVAL(fixed, 4, output_buffer_length);
|
||||
SBVAL(fixed, 8, fid_persistent);
|
||||
SBVAL(fixed, 16, fid_volatile);
|
||||
|
Loading…
Reference in New Issue
Block a user