git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d304341
)
libcli: Slightly simplify smb2cli_req_recv() with an early return
author
Volker Lendecke
<vl@samba.org>
Tue, 9 Jun 2020 14:15:46 +0000
(16:15 +0200)
committer
Jeremy Allison
<jra@samba.org>
Mon, 15 Jun 2020 17:59:39 +0000
(17:59 +0000)
One if-condition less
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
libcli/smb/smbXcli_base.c
patch
|
blob
|
history
diff --git
a/libcli/smb/smbXcli_base.c
b/libcli/smb/smbXcli_base.c
index 895fa64fcf5be034c3b8351a4a92282e319d8834..3e5bee92ed17b68aa87854fb1f6d3ef0291ee278 100644
(file)
--- a/
libcli/smb/smbXcli_base.c
+++ b/
libcli/smb/smbXcli_base.c
@@
-4012,15
+4012,10
@@
NTSTATUS smb2cli_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
if (tevent_req_is_nterror(req, &status)) {
for (i=0; i < num_expected; i++) {
if (NT_STATUS_EQUAL(status, expected[i].status)) {
- found_status = true;
- break;
+ return NT_STATUS_UNEXPECTED_NETWORK_ERROR;
}
}
- if (found_status) {
- return NT_STATUS_UNEXPECTED_NETWORK_ERROR;
- }
-
return status;
}