1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

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
This commit is contained in:
Volker Lendecke 2013-12-06 09:29:19 +00:00 committed by Jeremy Allison
parent 4ec65713fe
commit eaf807c361

View File

@ -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;
}