From: Danny Al-Gaaf Date: Tue, 18 Aug 2015 10:34:01 +0000 (+0200) Subject: client/Client.cc: remove only once used variable X-Git-Tag: v0.94.7~23^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e7f299ace762c7d02cad1f7253dba87404d944f5;p=ceph.git 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 Signed-off-by: Yan, Zheng (cherry picked from commit a29dd45dd89f59ff15018f541601ac5ede162174) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 43131f8d257e..a966b1702116 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -4388,10 +4388,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.... - int initial_group_count = 16; - gid_t *sgids = NULL; int sgid_count = 0; if (getgroups_cb) { @@ -4403,8 +4399,10 @@ 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; + // use PAM to get the group list + // 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;