]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client/Client.cc: reduce scope of variable 'r'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 27 Apr 2018 21:51:56 +0000 (23:51 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 27 Apr 2018 21:51:56 +0000 (23:51 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/client/Client.cc

index 131b65e61af92135f6de3c35cfc98ec22d6ba3f1..50ae38c73a6580794352e72274f10269167f6faf 100644 (file)
@@ -12364,7 +12364,6 @@ int Client::ll_link(Inode *in, Inode *newparent, const char *newname,
   tout(cct) << vnewparent << std::endl;
   tout(cct) << newname << std::endl;
 
-  int r = 0;
   InodeRef target;
 
   auto fuse_default_permissions = cct->_conf->get_val<bool>(
@@ -12373,7 +12372,7 @@ int Client::ll_link(Inode *in, Inode *newparent, const char *newname,
     if (S_ISDIR(in->mode))
       return -EPERM;
 
-    r = may_hardlink(in, perm);
+    int r = may_hardlink(in, perm);
     if (r < 0)
       return r;