smbd: Use a struct initializer
authorVolker Lendecke <vl@samba.org>
Wed, 12 Aug 2015 06:58:31 +0000 (08:58 +0200)
committerMartin Schwenke <martins@samba.org>
Fri, 14 Aug 2015 05:46:12 +0000 (07:46 +0200)
Saves a few bytes of .text

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
source3/smbd/posix_acls.c

index 8d799fb6bf77f5d59f28150f14dcb019287c1521..5e39370ac91642add1ec66f3c3b79c494f875670 100644 (file)
@@ -2694,14 +2694,15 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
                if ((ace = talloc(talloc_tos(), canon_ace)) == NULL)
                        goto fail;
 
-               ZERO_STRUCTP(ace);
-               ace->type = tagtype;
-               ace->perms = convert_permset_to_mode_t(permset);
-               ace->attr = ALLOW_ACE;
-               ace->trustee = sid;
-               ace->unix_ug = unix_ug;
-               ace->owner_type = owner_type;
-               ace->ace_flags = get_pai_flags(pal, ace, is_default_acl);
+               *ace = (canon_ace) {
+                       .type = tagtype,
+                       .perms = convert_permset_to_mode_t(permset),
+                       .attr = ALLOW_ACE,
+                       .trustee = sid,
+                       .unix_ug = unix_ug,
+                       .owner_type = owner_type,
+                       .ace_flags = get_pai_flags(pal, ace, is_default_acl)
+               };
 
                DLIST_ADD(l_head, ace);
        }