From: Danny Al-Gaaf Date: Wed, 19 Feb 2014 13:54:02 +0000 (+0100) Subject: MonClient: pass function parameter by reference X-Git-Tag: v0.78~138^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19dad0313b24863f696d893270171cdd0e18bd0e;p=ceph.git MonClient: pass function parameter by reference [src/mon/MonClient.h:412]: (performance) Function parameter 'mon_name' should be passed by reference. Changed also parameter name in function implementation to match name in declaration. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 3ddd21fcecb07..25dd3cdfe3678 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -962,7 +962,7 @@ int MonClient::start_mon_command(const vector& cmd, return 0; } -int MonClient::start_mon_command(string name, +int MonClient::start_mon_command(const string &mon_name, const vector& cmd, const bufferlist& inbl, bufferlist *outbl, string *outs, @@ -970,7 +970,7 @@ int MonClient::start_mon_command(string name, { Mutex::Locker l(monc_lock); MonCommand *r = new MonCommand(++last_mon_command_tid); - r->target_name = name; + r->target_name = mon_name; r->cmd = cmd; r->inbl = inbl; r->poutbl = outbl; diff --git a/src/mon/MonClient.h b/src/mon/MonClient.h index 5d2bf81d9d38a..a2998bb60c7a9 100644 --- a/src/mon/MonClient.h +++ b/src/mon/MonClient.h @@ -409,7 +409,7 @@ public: const vector& cmd, const bufferlist& inbl, bufferlist *outbl, string *outs, Context *onfinish); - int start_mon_command(const string mon_name, ///< mon name, with mon. prefix + int start_mon_command(const string &mon_name, ///< mon name, with mon. prefix const vector& cmd, const bufferlist& inbl, bufferlist *outbl, string *outs, Context *onfinish);