]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RGW: fix shadowed variable error
authorSamuel Just <samuel.just@dreamhost.com>
Wed, 2 Feb 2011 20:01:22 +0000 (12:01 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Wed, 2 Feb 2011 22:38:14 +0000 (14:38 -0800)
int ret and bool ret shadow this->ret, setting ret before the goto
therefore had no effect in these cases.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/rgw/rgw_op.cc

index f302f77e24a848489d9f004740e94ee4366626d9..a63e1d55e2ccb8770e3f36e9cecede3f99582ecd 100644 (file)
@@ -319,7 +319,7 @@ void RGWPutObj::execute()
       goto done;
     }
 
-    bool ret = policy.create_canned(s->user.user_id, s->user.display_name, s->canned_acl);
+    ret = policy.create_canned(s->user.user_id, s->user.display_name, s->canned_acl);
     if (!ret) {
        err.code = "InvalidArgument";
        ret = -EINVAL;
@@ -333,7 +333,7 @@ void RGWPutObj::execute()
 
     if (supplied_md5_b64) {
       RGW_LOG(15) << "supplied_md5_b64=" << supplied_md5_b64 << endl;
-      int ret = ceph_unarmor(supplied_md5_bin, &supplied_md5_bin[MD5::DIGESTSIZE + 1], 
+      ret = ceph_unarmor(supplied_md5_bin, &supplied_md5_bin[MD5::DIGESTSIZE + 1], 
                             supplied_md5_b64, supplied_md5_b64 + strlen(supplied_md5_b64));
       RGW_LOG(15) << "ceph_armor ret=" << ret << endl;
       if (ret != MD5::DIGESTSIZE) {