summaryrefslogtreecommitdiff
path: root/source4/torture/util_smb.c
diff options
context:
space:
mode:
authorGarming Sam <garming@catalyst.net.nz>2014-02-14 18:04:22 +1300
committerAndreas Schneider <asn@cryptomilk.org>2014-03-05 16:33:22 +0100
commit0b8213ae1cd0129b7a50cf7ba3605512a990520f (patch)
treee30b7e9f85f1f391060101a833928904f44dbed0 /source4/torture/util_smb.c
parent856c74e013eaa53902479b771e6c0cf1fea67745 (diff)
downloadsamba-0b8213ae1cd0129b7a50cf7ba3605512a990520f.tar.gz
Remove all uses of the NT_STATUS_NOT_OK_RETURN_AND_FREE macro from the codebase.
Following the current coding guidelines, it is considered bad practice to return from within a macro and change control flow as they look like normal function calls. Change-Id: I421e169275fe323e2b019c6cc5d386289aec07f7 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/torture/util_smb.c')
-rw-r--r--source4/torture/util_smb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
index 343c8a7f351..588ac055c7e 100644
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -915,7 +915,10 @@ NTSTATUS torture_check_privilege(struct smbcli_state *cli,
}
status = dom_sid_split_rid(tmp_ctx, sid, NULL, &rid);
- NT_STATUS_NOT_OK_RETURN_AND_FREE(status, tmp_ctx);
+ if (!NT_STATUS_IS_OK(status)) {
+ TALLOC_FREE(tmp_ctx);
+ return status;
+ }
if (rid == DOMAIN_RID_ADMINISTRATOR) {
/* assume the administrator has them all */