From 5caaf00e7b523759485a86d0940b91f538d1193c Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 11 Aug 2015 13:37:42 +0200 Subject: [PATCH] nfs4acls: Remove a few unnecessary casts Signed-off-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- source3/modules/nfs4_acls.c | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index a680ad182e3..80cd5c0a1ca 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -181,7 +181,7 @@ struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx) } theacl->controlflags = SEC_DESC_SELF_RELATIVE; /* theacl->first, last = NULL not needed */ - return (struct SMB4ACL_T *)theacl; + return theacl; } struct SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *acl, SMB_ACE4PROP_T *prop) @@ -203,12 +203,12 @@ struct SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *acl, SMB_ACE4PROP_T *prop) acl->first = ace; acl->last = ace; } else { - acl->last->next = (void *)ace; + acl->last->next = ace; acl->last = ace; } acl->naces++; - return (struct SMB4ACE_T *)ace; + return ace; } SMB_ACE4PROP_T *smb_get_ace4(struct SMB4ACE_T *ace) @@ -326,9 +326,7 @@ static bool smbacl4_nfs42win(TALLOC_CTX *mem_ctx, return false; } - for (aceint=acl->first; - aceint!=NULL; - aceint=(struct SMB4ACE_T *)aceint->next) { + for (aceint = acl->first; aceint != NULL; aceint = aceint->next) { uint32_t mask; struct dom_sid sid; SMB_ACE4PROP_T *ace = &aceint->prop; @@ -586,9 +584,7 @@ static void smbacl4_dump_nfs4acl(int level, struct SMB4ACL_T *acl) DEBUG(level, ("NFS4ACL: size=%d\n", acl->naces)); - for (aceint = acl->first; - aceint!=NULL; - aceint=(struct SMB4ACE_T *)aceint->next) { + for (aceint = acl->first; aceint != NULL; aceint = aceint->next) { SMB_ACE4PROP_T *ace = &aceint->prop; DEBUG(level, ("\tACE: type=%d, flags=0x%x, fflags=0x%x, " @@ -611,8 +607,7 @@ static SMB_ACE4PROP_T *smbacl4_find_equal_special( { struct SMB4ACE_T *aceint; - for (aceint = acl->first; aceint != NULL; - aceint=(struct SMB4ACE_T *)aceint->next) { + for (aceint = acl->first; aceint != NULL; aceint = aceint->next) { SMB_ACE4PROP_T *ace = &aceint->prop; DEBUG(10,("ace type:0x%x flags:0x%x aceFlags:0x%x " @@ -782,8 +777,7 @@ static int smbacl4_substitute_special( { struct SMB4ACE_T *aceint; - for(aceint = acl->first; aceint!=NULL; - aceint=(struct SMB4ACE_T *)aceint->next) { + for (aceint = acl->first; aceint != NULL; aceint = aceint->next) { SMB_ACE4PROP_T *ace = &aceint->prop; DEBUG(10,("ace type: %d, iflags: %x, flags: %x, " @@ -818,8 +812,7 @@ static int smbacl4_substitute_simple( { struct SMB4ACE_T *aceint; - for(aceint = acl->first; aceint!=NULL; - aceint=(struct SMB4ACE_T *)aceint->next) { + for (aceint = acl->first; aceint != NULL; aceint = aceint->next) { SMB_ACE4PROP_T *ace = &aceint->prop; DEBUG(10,("ace type: %d, iflags: %x, flags: %x, " -- 2.11.4.GIT