]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
CephxProtocol.h: pass CryptoKey by reference to decode_decrypt()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 12:14:02 +0000 (13:14 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 12:59:18 +0000 (13:59 +0100)
Fix issues found by cppcheck:

[src/auth/cephx/CephxProtocol.h:469]: (performance) Function
  parameter 'key' should be passed by reference.

Pass CryptoKey by reference as already done in encode_encrypt().

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

index 38e0616b501ed242e22e094b256828b0d8db6e7f..9386a410f95d8e0706bd67c474535c35511f94fe 100644 (file)
@@ -466,7 +466,7 @@ void encode_encrypt_enc_bl(CephContext *cct, const T& t, const CryptoKey& key,
 }
 
 template <typename T>
-int decode_decrypt(CephContext *cct, T& t, const CryptoKey key,
+int decode_decrypt(CephContext *cct, T& t, const CryptoKey& key,
                    bufferlist::iterator& iter, std::string &error)
 {
   bufferlist bl_enc;