]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: multipart copy part minor parsing cleanup
authorYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Sep 2016 21:24:13 +0000 (14:24 -0700)
committerMatt Benjamin <mbenjamin@redhat.com>
Mon, 27 Mar 2017 22:50:53 +0000 (18:50 -0400)
no need for range.size()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 6e9b824d5d4017239d58b4752ebc43bfad8f698d)

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/rgw_rest_s3.cc

index 0e87c0576e916555ff3c7146541c0dd723754a8d..18a5593f41f7675e7eb673fa9f61d1a28ffd6b93 100644 (file)
@@ -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);
     }