From fb811ecff83750586cdd7dfbd1d28eee7ead8e70 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 13 Feb 2013 16:01:48 +0100 Subject: [PATCH] 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 --- src/rgw/rgw_log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 57f73129f2936..b79cf30bbe317 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); -- 2.39.5