From d783f95c204d8fdf60b668fd4990b3bc5e5d37c0 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Tue, 26 Feb 2013 15:56:03 +0100 Subject: [PATCH] CephxProtocol.cc: catch end_of_buffer by reference Follow 'Throw by value, catch by reference' to void copying and potential slicing the exception. Signed-off-by: Danny Al-Gaaf --- src/auth/cephx/CephxProtocol.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auth/cephx/CephxProtocol.cc b/src/auth/cephx/CephxProtocol.cc index 34f31f70c7238..483415fac0296 100644 --- a/src/auth/cephx/CephxProtocol.cc +++ b/src/auth/cephx/CephxProtocol.cc @@ -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; } -- 2.39.5