From: Volker Lendecke Date: Tue, 11 Aug 2015 10:12:53 +0000 (+0200) Subject: nfs4acls: Use ZERO_STRUCTP X-Git-Tag: talloc-2.1.4~421 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db523b169def3aef11664d7a297cd0bc44259fd;p=thirdparty%2Fsamba.git nfs4acls: Use ZERO_STRUCTP Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index 9475248c2ce..48d0215ca02 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -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;