diff options
author | Andreas Schneider <asn@samba.org> | 2018-05-16 16:54:47 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-05-16 21:30:23 +0200 |
commit | 25c4f8c561edb83054218d1eba9f92e41a6573c5 (patch) | |
tree | c18966bdda574182641d8f26e534c1e5e2ad27fe /libcli | |
parent | 3f1da75f3a0cf0d5c1cce1b987dda6e0115ca8dc (diff) | |
download | samba-25c4f8c561edb83054218d1eba9f92e41a6573c5.tar.gz |
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>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smb2cli_notify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libcli/smb/smb2cli_notify.c b/libcli/smb/smb2cli_notify.c index 34329ba16cc..1a2a2793a32 100644 --- a/libcli/smb/smb2cli_notify.c +++ b/libcli/smb/smb2cli_notify.c @@ -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); |