From: Yehuda Sadeh Date: Thu, 29 Sep 2016 21:24:13 +0000 (-0700) Subject: rgw: multipart copy part minor parsing cleanup X-Git-Tag: v10.2.7~22^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9ab65f5501fb59aac17cfdde57371b00af03d84b;p=ceph.git 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 --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 0e87c0576e9..18a5593f41f 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); }