From: J. Bruce Fields Date: Tue, 17 Jul 2007 11:04:36 +0000 (-0700) Subject: knfsd: nfsd4: silence a compiler warning in ACL code X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f7fede4b27bfc6c987d6da8e40384b1b098830bb;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git knfsd: nfsd4: silence a compiler warning in ACL code Silence a compiler warning in the ACL code, and add a comment making clear the initialization serves no other purpose. Signed-off-by: "J. Bruce Fields" Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c index cc3b7badd486..4adb5ee4759b 100644 --- a/fs/nfsd/nfs4acl.c +++ b/fs/nfsd/nfs4acl.c @@ -183,8 +183,13 @@ static void summarize_posix_acl(struct posix_acl *acl, struct posix_acl_summary *pas) { struct posix_acl_entry *pa, *pe; - pas->users = 0; - pas->groups = 0; + + /* + * Only pas.users and pas.groups need initialization; previous + * posix_acl_valid() calls ensure that the other fields will be + * initialized in the following loop. But, just to placate gcc: + */ + memset(pas, 0, sizeof(*pas)); pas->mask = 07; pe = acl->a_entries + acl->a_count;