Skip to content

Commit

Permalink
rgw: multipart copy part minor parsing cleanup
Browse files Browse the repository at this point in the history
no need for range.size()

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
  • Loading branch information
yehudasa committed Sep 29, 2016
1 parent 2bcb3d2 commit 6e9b824
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rgw/rgw_rest_s3.cc
Expand Up @@ -1104,15 +1104,15 @@ 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;
ldout(s->cct, 5) << "x-amz-copy-source-range bad format" << dendl;
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);
}
Expand Down

0 comments on commit 6e9b824

Please sign in to comment.