Skip to content

Commit

Permalink
Merge pull request ceph#15928 from liewegas/wip-rgw-warning
Browse files Browse the repository at this point in the history
rgw/rgw_op: fix whitespace and indentation warning

Reviewed-by: Abhishek Lekshmanan <[email protected]>
Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley authored Jun 27, 2017
2 parents 7f3a73b + cb57ecc commit c30b28f
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions src/rgw/rgw_op.cc
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,8 @@ int RGWGetObjTags::verify_permission()
return 0;
}

void RGWGetObjTags::pre_exec(){
void RGWGetObjTags::pre_exec()
{
rgw_bucket_object_pre_exec(s);
}

Expand Down Expand Up @@ -736,12 +737,10 @@ int RGWPutObjTags::verify_permission()

void RGWPutObjTags::execute()
{

op_ret = get_params();
if (op_ret < 0)
return;


if (s->object.empty()){
op_ret= -EINVAL; // we only support tagging on existing objects
return;
Expand All @@ -756,14 +755,15 @@ void RGWPutObjTags::execute()
}
}

void RGWDeleteObjTags::pre_exec(){
void RGWDeleteObjTags::pre_exec()
{
rgw_bucket_object_pre_exec(s);
}


int RGWDeleteObjTags::verify_permission(){

if (!s->object.empty()){
int RGWDeleteObjTags::verify_permission()
{
if (!s->object.empty()) {
if (!verify_object_permission(s,
s->object.instance.empty() ?
rgw::IAM::s3DeleteObjectTagging:
Expand All @@ -773,18 +773,19 @@ int RGWDeleteObjTags::verify_permission(){
return 0;
}

void RGWDeleteObjTags::execute() {
void RGWDeleteObjTags::execute()
{
if (s->object.empty())
return;

rgw_obj obj;
obj = rgw_obj(s->bucket, s->object);
store->set_atomic(s->obj_ctx, obj);
map <string, bufferlist> attrs;
map <string, bufferlist> rmattr;
bufferlist bl;
rmattr[RGW_ATTR_TAGS] = bl;
op_ret = store->set_attrs(s->obj_ctx, s->bucket_info, obj, attrs, &rmattr);
rgw_obj obj;
obj = rgw_obj(s->bucket, s->object);
store->set_atomic(s->obj_ctx, obj);
map <string, bufferlist> attrs;
map <string, bufferlist> rmattr;
bufferlist bl;
rmattr[RGW_ATTR_TAGS] = bl;
op_ret = store->set_attrs(s->obj_ctx, s->bucket_info, obj, attrs, &rmattr);
}

int RGWOp::do_aws4_auth_completion()
Expand Down

0 comments on commit c30b28f

Please sign in to comment.