]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
client/Client.cc: reduce scope of some variables
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 3 Feb 2016 11:19:48 +0000 (12:19 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 19 Feb 2016 11:50:35 +0000 (12:50 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/Client.cc

index c506c4550b6357fb8487bf180657371c668c8a96..1abeb2a5aba4992782459e5e3b6cfba3f8180336 100644 (file)
@@ -4816,6 +4816,7 @@ void Client::handle_cap_grant(MetaSession *session, Inode *in, Cap *cap, MClient
 
 int Client::_getgrouplist(gid_t** sgids, int uid, int gid)
 {
+  // cppcheck-suppress variableScope
   int sgid_count;
   gid_t *sgid_buf;
 
@@ -4875,9 +4876,8 @@ int Client::inode_permission(Inode *in, uid_t uid, UserGroups& groups, unsigned
   if (uid == 0)
     return 0;
 
-  int ret;
   if (uid != in->uid && (in->mode & S_IRWXG)) {
-    ret = _posix_acl_permission(in, uid, groups, want);
+    int ret = _posix_acl_permission(in, uid, groups, want);
     if (ret != -EAGAIN)
       return ret;
   }