]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: avoid large pass by value in MForward
authorSage Weil <sage@inktank.com>
Sat, 29 Sep 2012 08:35:36 +0000 (01:35 -0700)
committerSage Weil <sage@inktank.com>
Sat, 29 Sep 2012 08:35:36 +0000 (01:35 -0700)
CID 717035: Big parameter passed by value (PASS_BY_VALUE)
At (1): Passing parameter caps of type MonCaps (size 144 bytes) by value.

Signed-off-by: Sage Weil <sage@inktank.com>
src/messages/MForward.h

index 2c60b429e75b14e4ef0ae591395a71db34746716..b85a733292aa678a222e95d190bb6bfb1931e6d4 100644 (file)
@@ -36,7 +36,7 @@ struct MForward : public Message {
     client = m->get_source_inst();
     client_caps = m->get_session()->caps;
   }
-  MForward(uint64_t t, PaxosServiceMessage *m, MonCaps caps) :
+  MForward(uint64_t t, PaxosServiceMessage *m, const MonCaps& caps) :
     Message(MSG_FORWARD), tid(t), msg(m), client_caps(caps) {
     client = m->get_source_inst();
   }