]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_rest_swift.cc: don't pass c_str() result to std::string argument
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 13 Feb 2013 17:42:47 +0000 (18:42 +0100)
committerGreg Farnum <greg@inktank.com>
Thu, 14 Feb 2013 18:27:39 +0000 (10:27 -0800)
Fix issue found by cppcheck:
[src/rgw/rgw_rest_swift.cc:770]: (performance) Passing the result of
  c_str() to a function that takes std::string as argument no. 1 is
  slow and redundant.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_rest_swift.cc

index bea20b5647608508ae131cbe9e77215523f8f1b8..28749aafe42081718c14ca00849b7d35471ab55d 100644 (file)
@@ -767,7 +767,7 @@ int RGWHandler_ObjStore_SWIFT::init(RGWRados *store, struct req_state *s, RGWCli
   int ret = validate_bucket_name(s->bucket_name_str.c_str());
   if (ret)
     return ret;
-  ret = validate_object_name(s->object_str.c_str());
+  ret = validate_object_name(s->object_str);
   if (ret)
     return ret;