From: Yehuda Sadeh Date: Thu, 29 Sep 2016 21:24:13 +0000 (-0700) Subject: rgw: multipart copy part minor parsing cleanup X-Git-Tag: v11.1.0~659^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6e9b824d5d4017239d58b4752ebc43bfad8f698d;p=ceph.git rgw: multipart copy part minor parsing cleanup no need for range.size() Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index c333c108af04..0435080d7928 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -1104,7 +1104,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; @@ -1112,7 +1112,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); }