Skip to content

Commit

Permalink
Merge pull request #52197 from imtzw/rm_op_ret
Browse files Browse the repository at this point in the history
rgw: remove useless op ret assign

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
ivancich authored Sep 7, 2023
2 parents cbc4c2b + ec9da5b commit abfede8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/rgw/rgw_rest_s3.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2291,11 +2291,10 @@ int RGWSetBucketWebsite_ObjStore_S3::get_params(optional_yield y)
<< max_num
<< " rules, request website routing rules num: "
<< routing_rules_num << dendl;
op_ret = -ERR_INVALID_WEBSITE_ROUTING_RULES_ERROR;
s->err.message = std::to_string(routing_rules_num) +" routing rules provided, the number of routing rules in a website configuration is limited to "
+ std::to_string(max_num)
+ ".";
return -ERR_INVALID_REQUEST;
return -ERR_INVALID_WEBSITE_ROUTING_RULES_ERROR;
}

return 0;
Expand Down Expand Up @@ -3756,10 +3755,9 @@ int RGWPutCORS_ObjStore_S3::get_params(optional_yield y)
<< max_num
<< " rules, request cors rules num: "
<< cors_rules_num << dendl;
op_ret = -ERR_INVALID_CORS_RULES_ERROR;
s->err.message = "The number of CORS rules should not exceed allowed limit of "
+ std::to_string(max_num) + " rules.";
return -ERR_INVALID_REQUEST;
return -ERR_INVALID_CORS_RULES_ERROR;
}

// forward bucket cors requests to meta master zone
Expand Down

0 comments on commit abfede8

Please sign in to comment.