From: Danny Al-Gaaf Date: Wed, 13 Feb 2013 15:01:48 +0000 (+0100) Subject: rgw/rgw_log.cc: don't pass c_str() result to std::string argument X-Git-Tag: v0.58~66^2~34 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fb811ecff83750586cdd7dfbd1d28eee7ead8e70;p=ceph.git rgw/rgw_log.cc: don't pass c_str() result to std::string argument Fix issue found by cppcheck: [src/rgw/rgw_log.cc:340]: (performance) Passing the result of c_str() to a function that takes std::string as argument no. 4 is slow and redundant. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 57f73129f293..b79cf30bbe31 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -338,7 +338,7 @@ int rgw_log_op(RGWRados *store, struct req_state *s, const string& op_name, OpsL if (s->cct->_conf->rgw_ops_log_rados) { string oid = render_log_object_name(s->cct->_conf->rgw_log_object_name, &bdt, - s->bucket.bucket_id, entry.bucket.c_str()); + s->bucket.bucket_id, entry.bucket); rgw_obj obj(store->params.log_pool, oid);