diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 48813d6522c6c..b790362efd0c7 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3130,7 +3130,7 @@ void RGWPutMetadataBucket::execute() if (has_cors) { buffer::list bl; cors_config.encode(bl); - emplace_attr(RGW_ATTR_CORS, std::move(bl)); + attrs[RGW_ATTR_CORS] = std::move(bl); } /* It's supposed that following functions WILL NOT change any special diff --git a/src/rgw/rgw_swift_auth.cc b/src/rgw/rgw_swift_auth.cc index 350fa92ec3b1d..e626f86e6c130 100644 --- a/src/rgw/rgw_swift_auth.cc +++ b/src/rgw/rgw_swift_auth.cc @@ -387,9 +387,7 @@ static int encode_token(CephContext *cct, string& swift_user, string& key, utime_t expiration = ceph_clock_now(cct); expiration += cct->_conf->rgw_swift_token_expiration; - ret = build_token(swift_user, key, nonce, expiration, bl); - - return ret; + return build_token(swift_user, key, nonce, expiration, bl); }