From: Danny Al-Gaaf Date: Wed, 13 Feb 2013 17:42:47 +0000 (+0100) Subject: rgw/rgw_rest_swift.cc: don't pass c_str() result to std::string argument X-Git-Tag: v0.58~66^2~13 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b14994e51b73b66a13d4f16f620d2b170ea3d670;p=ceph.git rgw/rgw_rest_swift.cc: don't pass c_str() result to std::string argument 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 --- diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index bea20b564760..28749aafe420 100644 --- a/src/rgw/rgw_rest_swift.cc +++ b/src/rgw/rgw_rest_swift.cc @@ -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;