diff options
author | Garming Sam <garming@catalyst.net.nz> | 2014-02-14 18:04:22 +1300 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-03-05 16:33:22 +0100 |
commit | 0b8213ae1cd0129b7a50cf7ba3605512a990520f (patch) | |
tree | e30b7e9f85f1f391060101a833928904f44dbed0 /source4/ntvfs | |
parent | 856c74e013eaa53902479b771e6c0cf1fea67745 (diff) | |
download | samba-0b8213ae1cd0129b7a50cf7ba3605512a990520f.tar.gz samba-0b8213ae1cd0129b7a50cf7ba3605512a990520f.tar.xz samba-0b8213ae1cd0129b7a50cf7ba3605512a990520f.zip |
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/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_acl.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c index b8632d2b46..ad1787c803 100644 --- a/source4/ntvfs/posix/pvfs_acl.c +++ b/source4/ntvfs/posix/pvfs_acl.c @@ -936,7 +936,10 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs, talloc_free(tmp_ctx); return NT_STATUS_OK; } - NT_STATUS_NOT_OK_RETURN_AND_FREE(status, tmp_ctx); + if (!NT_STATUS_IS_OK(status)) { + TALLOC_FREE(tmp_ctx); + return status; + } switch (acl->version) { case 1: @@ -979,7 +982,10 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs, ids[1].status = ID_UNKNOWN; status = wbc_xids_to_sids(pvfs->ntvfs->ctx->event_ctx, ids, 2); - NT_STATUS_NOT_OK_RETURN_AND_FREE(status, tmp_ctx); + if (!NT_STATUS_IS_OK(status)) { + TALLOC_FREE(tmp_ctx); + return status; + } sd->owner_sid = talloc_steal(sd, ids[0].sid); sd->group_sid = talloc_steal(sd, ids[1].sid); @@ -988,7 +994,10 @@ NTSTATUS pvfs_acl_inherited_sd(struct pvfs_state *pvfs, /* fill in the aces from the parent */ status = pvfs_acl_inherit_aces(pvfs, parent_sd, sd, container); - NT_STATUS_NOT_OK_RETURN_AND_FREE(status, tmp_ctx); + if (!NT_STATUS_IS_OK(status)) { + TALLOC_FREE(tmp_ctx); + return status; + } /* if there is nothing to inherit then we fallback to the default acl */ |