]> 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)
committerYehuda Sadeh <yehuda@redhat.com>
Thu, 29 Sep 2016 21:24:13 +0000 (14:24 -0700)
no need for range.size()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_rest_s3.cc

index c333c108af04da9519b361243950504e4ad75dab..0435080d7928ffdd0cb9447292edd6c3b8a9d37a 100644 (file)
@@ -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);
     }