]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client/Client.cc: remove only once used variable
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 18 Aug 2015 10:34:01 +0000 (12:34 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 10 Sep 2015 17:29:20 +0000 (19:29 +0200)
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 <danny.al-gaaf@bisect.de>
src/client/Client.cc

index 20e946d8e87c5295889d5d2eb56cc5e168bb9e29..369d2b2d4616940b4278895f05dd178b7ada4de1 100644 (file)
@@ -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;