]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: Catch exceptions at const references
authorAdam C. Emerson <aemerson@redhat.com>
Tue, 8 May 2018 23:53:19 +0000 (19:53 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Wed, 9 May 2018 17:26:29 +0000 (13:26 -0400)
/Never/ by value.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/rgw_op.cc
src/rgw/rgw_swift_auth.cc

index 8c9e568e8a5f83318ba0b0d0e64466988c471cad..a28d40735360cebf4f0be8bd505da58fce758f36 100644 (file)
@@ -4310,7 +4310,7 @@ int RGWDeleteObj::handle_slo_manifest(bufferlist& bl)
   try {
     deleter = std::unique_ptr<RGWBulkDelete::Deleter>(\
           new RGWBulkDelete::Deleter(store, s));
-  } catch (std::bad_alloc) {
+  } catch (const std::bad_alloc&) {
     return -ENOMEM;
   }
 
index 4e9b082eaae271ec72125fe7aecccd6aec0acc1d..d73b6d51d9635b985d8a3d5434c148c9fc10c17c 100644 (file)
@@ -399,7 +399,7 @@ ExternalTokenEngine::authenticate(const std::string& token,
     } else {
       swift_user = std::move(swift_groups[0]);
     }
-  } catch (std::out_of_range) {
+  } catch (const std::out_of_range&) {
     /* The X-Auth-Groups header isn't present in the response. */
     return result_t::deny(-EPERM);
   }