]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Make use of ZERO_STRUCT (the first memset was actually wrong)
authorVolker Lendecke <vl@samba.org>
Thu, 9 Oct 2008 15:22:59 +0000 (17:22 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 9 Oct 2008 15:30:38 +0000 (17:30 +0200)
source/modules/vfs_gpfs.c

index d10906dfb1e07da32a85d06f92dab0d2f322ff05..fe07097ec4799e689d0393f86a75c67b4c030027 100644 (file)
@@ -179,7 +179,7 @@ static int gpfs_get_nfs4_acl(const char *fname, SMB4ACL_T **ppacl)
                           "who: %d\n", gace->aceType, gace->aceIFlags,
                           gace->aceFlags, gace->aceMask, gace->aceWho));
 
-               memset(&smbace, 0, sizeof(SMB4ACE_T));
+               ZERO_STRUCT(smbace);
                if (gace->aceIFlags & ACE4_IFLAG_SPECIAL_ID) {
                        smbace.flags |= SMB_ACE4_ID_SPECIAL;
                        switch (gace->aceWho) {
@@ -744,7 +744,7 @@ static int gpfsacl_emu_chmod(const char *path, mode_t mode)
                if (haveAllowEntry[i]==True)
                        continue;
                
-               memset(&ace, 0, sizeof(SMB_ACE4PROP_T));
+               ZERO_STRUCT(ace);
                ace.aceType = SMB_ACE4_ACCESS_ALLOWED_ACE_TYPE;
                ace.flags |= SMB_ACE4_ID_SPECIAL;
                ace.who.special_id = i;
@@ -766,7 +766,7 @@ static int gpfsacl_emu_chmod(const char *path, mode_t mode)
        }
        
        /* don't add complementary DENY ACEs here */
-       memset(&fake_fsp, 0, sizeof(struct files_struct));
+       ZERO_STRUCT(fake_fsp);
        fake_fsp.fsp_name = (char *)path; /* no file_new is needed here */
        
        /* put the acl */