From: Yan Jun Date: Sat, 25 Jun 2016 07:31:57 +0000 (+0800) Subject: rgw/rgw_rados.cc: remove uneccessary temporary variable X-Git-Tag: ses5-milestone5~541^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7bed2739bcf3a5776efa669cbabfa9be4223670e;p=ceph.git rgw/rgw_rados.cc: remove uneccessary temporary variable Signed-off-by: Yan Jun --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 078fe9cd84c8..d7a259bb13e8 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -4057,9 +4057,7 @@ int RGWRados::open_pool_ctx(const string& pool, librados::IoCtx& io_ctx) if (r < 0 && r != -EEXIST) return r; - r = rad->ioctx_create(pool.c_str(), io_ctx); - - return r; + return rad->ioctx_create(pool.c_str(), io_ctx); } int RGWRados::open_bucket_data_ctx(rgw_bucket& bucket, librados::IoCtx& data_ctx) @@ -11217,8 +11215,7 @@ int RGWRados::cls_rgw_init_index(librados::IoCtx& index_ctx, librados::ObjectWri { bufferlist in; cls_rgw_bucket_init(op); - int r = index_ctx.operate(oid, &op); - return r; + return index_ctx.operate(oid, &op); } int RGWRados::cls_obj_prepare_op(BucketShard& bs, RGWModifyOp op, string& tag, @@ -11227,8 +11224,7 @@ int RGWRados::cls_obj_prepare_op(BucketShard& bs, RGWModifyOp op, string& tag, ObjectWriteOperation o; cls_rgw_obj_key key(obj.get_index_key_name(), obj.get_instance()); cls_rgw_bucket_prepare_op(o, op, tag, key, obj.get_loc(), get_zone().log_data, bilog_flags); - int r = bs.index_ctx.operate(bs.bucket_obj, &o); - return r; + return bs.index_ctx.operate(bs.bucket_obj, &o); } int RGWRados::cls_obj_complete_op(BucketShard& bs, RGWModifyOp op, string& tag,