From 9ab65f5501fb59aac17cfdde57371b00af03d84b Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Thu, 29 Sep 2016 14:24:13 -0700 Subject: [PATCH] rgw: multipart copy part minor parsing cleanup no need for range.size() Signed-off-by: Yehuda Sadeh (cherry picked from commit 6e9b824d5d4017239d58b4752ebc43bfad8f698d) Signed-off-by: Matt Benjamin --- src/rgw/rgw_rest_s3.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 0e87c0576e916..18a5593f41f76 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -1105,7 +1105,7 @@ int RGWPutObj_ObjStore_S3::get_params() ldout(s->cct, 5) << "x-amz-copy-source-range bad format" << dendl; return ret; } - range = range.substr(pos + 1, range.size()); + range = range.substr(pos + 1); pos = range.find("-"); if (pos == std::string::npos) { ret = -EINVAL; @@ -1113,7 +1113,7 @@ int RGWPutObj_ObjStore_S3::get_params() return ret; } string first = range.substr(0, pos); - string last = range.substr(pos + 1, range.size()); + string last = range.substr(pos + 1); copy_source_range_fst = strtoull(first.c_str(), NULL, 10); copy_source_range_lst = strtoull(last.c_str(), NULL, 10); } -- 2.39.5