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