]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_log.cc: don't pass c_str() result to std::string argument
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 15:01:48 +0000 (16:01 +0100)
committerGreg Farnum <greg@inktank.com>
Thu, 14 Feb 2013 18:27:38 +0000 (10:27 -0800)
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 <danny.al-gaaf@bisect.de>
src/rgw/rgw_log.cc

index 57f73129f29368e2723c524cbf41879970169ea1..b79cf30bbe317443b21341d4f336d4b666ceead3 100644 (file)
@@ -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);