From b14994e51b73b66a13d4f16f620d2b170ea3d670 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 13 Feb 2013 18:42:47 +0100 Subject: [PATCH] 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 --- src/rgw/rgw_rest_swift.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_swift.cc b/src/rgw/rgw_rest_swift.cc index bea20b5647608..28749aafe4208 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; -- 2.39.5