Merge pull request #19773 from chuang-he/fix_create_form_headers

rgw: fix the return type is wrong

Reviewed-by: Casey Bodley <cbodley@redhat.com>
This commit is contained in:
Yuri Weinstein 2018-01-08 08:46:02 -08:00 committed by GitHub
commit e57055c7cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -454,14 +454,17 @@ static const s3_acl_header acl_header_perms[] = {
int RGWAccessControlPolicy_S3::create_from_headers(RGWRados *store, const RGWEnv *env, ACLOwner& _owner)
{
std::list<ACLGrant> grants;
int r = 0;
for (const struct s3_acl_header *p = acl_header_perms; p->rgw_perm; p++) {
if (parse_acl_header(store, env, p, grants) < 0)
return false;
r = parse_acl_header(store, env, p, grants);
if (r < 0) {
return r;
}
}
RGWAccessControlList_S3& _acl = static_cast<RGWAccessControlList_S3 &>(acl);
int r = _acl.create_from_grants(grants);
r = _acl.create_from_grants(grants);
owner = _owner;