]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nfs4acls: Use ZERO_STRUCTP
authorVolker Lendecke <vl@samba.org>
Tue, 11 Aug 2015 10:12:53 +0000 (12:12 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 13 Aug 2015 12:40:15 +0000 (14:40 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/modules/nfs4_acls.c

index 9475248c2ce94c25aa57933f4a577c5a97e71147..48d0215ca02f86e0911cf289d564f88f29c323f2 100644 (file)
@@ -88,7 +88,7 @@ static int smbacl4_get_vfs_params(
        };
        int enumval;
 
-       memset(params, 0, sizeof(smbacl4_vfs_params));
+       ZERO_STRUCTP(params);
 
        enumval = lp_parm_enum(SNUM(conn), type_name, "mode",
                               enum_smbacl4_modes, e_simple);
@@ -313,7 +313,7 @@ static int smbacl4_GetFileOwner(struct connection_struct *conn,
                                const char *filename,
                                SMB_STRUCT_STAT *psbuf)
 {
-       memset(psbuf, 0, sizeof(SMB_STRUCT_STAT));
+       ZERO_STRUCTP(psbuf);
 
        /* Get the stat struct for the owner info. */
        if (vfs_stat_smb_basename(conn, filename, psbuf) != 0)
@@ -328,7 +328,7 @@ static int smbacl4_GetFileOwner(struct connection_struct *conn,
 
 static int smbacl4_fGetFileOwner(files_struct *fsp, SMB_STRUCT_STAT *psbuf)
 {
-       memset(psbuf, 0, sizeof(SMB_STRUCT_STAT));
+       ZERO_STRUCTP(psbuf);
 
        if (fsp->fh->fd == -1) {
                return smbacl4_GetFileOwner(fsp->conn,
@@ -711,7 +711,7 @@ static bool smbacl4_fill_ace4(
 {
        DEBUG(10, ("got ace for %s\n", sid_string_dbg(&ace_nt->trustee)));
 
-       memset(ace_v4, 0, sizeof(SMB_ACE4PROP_T));
+       ZERO_STRUCTP(ace_v4);
 
        /* only ACCESS|DENY supported right now */
        ace_v4->aceType = ace_nt->type;