]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CephxProtocol.cc: catch end_of_buffer by reference
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 14:56:03 +0000 (15:56 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 26 Feb 2013 14:56:03 +0000 (15:56 +0100)
Follow 'Throw by value, catch by reference' to void copying and
potential slicing the exception.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/auth/cephx/CephxProtocol.cc

index 34f31f70c72387e6dc64bb9265a4d9428f38b92e..483415fac02965062f9e2ed96a81bdb0fe42b463 100644 (file)
@@ -403,7 +403,7 @@ bool cephx_verify_authorizer(CephContext *cct, KeyStore *keys,
     ::decode(global_id, indata);
     ::decode(service_id, indata);
     ::decode(ticket, indata);
-  } catch (buffer::end_of_buffer e) {
+  } catch (buffer::end_of_buffer &e) {
     // Unable to decode!
     return false;
   }