diff options
| author | Volker Lendecke <vl@samba.org> | 2013-12-06 09:29:19 +0000 |
|---|---|---|
| committer | Jeremy Allison <jra@samba.org> | 2013-12-14 00:10:21 +0100 |
| commit | eaf807c361fc412405217e4b1199549f9925970b (patch) | |
| tree | 63cbe068f5c262d4abd77bd8340cef34823ad696 /libcli | |
| parent | 4ec65713fe21b7993fb4fe27754ff32b52775f1d (diff) | |
| download | samba-eaf807c361fc412405217e4b1199549f9925970b.tar.gz samba-eaf807c361fc412405217e4b1199549f9925970b.tar.xz samba-eaf807c361fc412405217e4b1199549f9925970b.zip | |
secacl: Slightly simplify make_sec_acl
This avoids a complex if-expression
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Dec 14 00:10:21 CET 2013 on sn-devel-104
Diffstat (limited to 'libcli')
| -rw-r--r-- | libcli/security/secacl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c index 61cf52134a..8d2ae102f0 100644 --- a/libcli/security/secacl.c +++ b/libcli/security/secacl.c @@ -54,9 +54,12 @@ struct security_acl *make_sec_acl(TALLOC_CTX *ctx, entries in it. This is achieved by checking that num_aces is a positive number. */ - if ((num_aces) && - ((dst->aces = talloc_array(dst, struct security_ace, num_aces)) - == NULL)) { + if (num_aces == 0) { + return dst; + } + + dst->aces = talloc_array(dst, struct security_ace, num_aces); + if (dst->aces == NULL) { TALLOC_FREE(dst); return NULL; } |
