From a29dd45dd89f59ff15018f541601ac5ede162174 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 18 Aug 2015 12:34:01 +0200 Subject: [PATCH] client/Client.cc: remove only once used variable Fix for: [src/client/Client.cc:4555]: (style) The scope of the variable 'initial_group_count' can be reduced. Signed-off-by: Danny Al-Gaaf --- src/client/Client.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 20e946d8e87..369d2b2d461 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -4560,12 +4560,6 @@ void Client::handle_cap_grant(MetaSession *session, Inode *in, Cap *cap, MClient int Client::check_permissions(Inode *in, int flags, int uid, int gid) { - // initial number of group entries, defaults to posix standard of 16 - // PAM implementations may provide more than 16 groups.... -#if HAVE_GETGROUPLIST - int initial_group_count = 16; -#endif - gid_t *sgids = NULL; int sgid_count = 0; if (getgroups_cb) { @@ -4578,7 +4572,9 @@ int Client::check_permissions(Inode *in, int flags, int uid, int gid) #if HAVE_GETGROUPLIST else { //use PAM to get the group list - sgid_count = initial_group_count; + // initial number of group entries, defaults to posix standard of 16 + // PAM implementations may provide more than 16 groups.... + sgid_count = 16; sgids = (gid_t*)malloc(sgid_count * sizeof(gid_t)); if (sgids == NULL) { ldout(cct, 3) << "allocating group memory failed" << dendl; -- 2.47.3