if (ofs >= max_head_size) {
manifest->set_head_size(max_head_size);
cur_stripe = (ofs - max_head_size) / rule.stripe_max_size;
- cur_stripe_size = rule.stripe_max_size;
+ cur_stripe_size = rule.stripe_max_size;
if (cur_part_id == 0 && max_head_size > 0) {
cur_stripe++;
int RGWRados::get_bucket_instance_info(RGWObjectCtx& obj_ctx, const string& meta_key, RGWBucketInfo& info,
real_time *pmtime, map<string, bufferlist> *pattrs)
{
- int pos = meta_key.find(':');
- if (pos < 0) {
+ size_t pos = meta_key.find(':');
+ if (pos == string::npos) {
return -EINVAL;
}
string oid = RGW_BUCKET_INSTANCE_MD_PREFIX + meta_key;