int RGWRados::log_list_next(RGWAccessHandle handle, string *name)
{
- log_list_state *state = (log_list_state *)handle;
+ log_list_state *state = static_cast<log_list_state *>(handle);
while (true) {
if (state->obit == state->io_ctx.objects_end()) {
delete state;
int RGWRados::log_show_next(RGWAccessHandle handle, rgw_log_entry *entry)
{
- log_show_state *state = (log_show_state *)handle;
+ log_show_state *state = static_cast<log_show_state *>(handle);
off_t off = state->p.get_off();
ldout(cct, 10) << "log_show_next pos " << state->pos << " bl " << state->bl.length()
std::string oid, key;
get_obj_bucket_and_oid_key(obj, bucket, oid, key);
librados::IoCtx io_ctx;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
int r = open_bucket_ctx(bucket, io_ctx);
if (r < 0)
return r;
-
io_ctx.locator_set_key(key);
ObjectWriteOperation op;
RGWObjManifest manifest;
RGWObjState *astate = NULL;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
ret = get_obj_state(rctx, src_obj, &astate);
if (ret < 0)
return ret;
int RGWRados::defer_gc(void *ctx, rgw_obj& obj)
{
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
rgw_bucket bucket;
std::string oid, key;
get_obj_bucket_and_oid_key(obj, bucket, oid, key);
std::string oid, key;
get_obj_bucket_and_oid_key(obj, bucket, oid, key);
librados::IoCtx io_ctx;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
int r = open_bucket_ctx(bucket, io_ctx);
if (r < 0)
return r;
librados::IoCtx io_ctx;
rgw_bucket actual_bucket = bucket;
string actual_obj = oid;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
if (actual_obj.size() == 0) {
actual_obj = bucket.name;
librados::IoCtx io_ctx;
rgw_bucket actual_bucket = bucket;
string actual_obj = oid;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
if (actual_obj.size() == 0) {
actual_obj = bucket.name;
get_obj_bucket_and_oid_key(obj, bucket, oid, key);
librados::IoCtx io_ctx;
string actual_obj = oid;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
rgw_bucket actual_bucket = bucket;
if (actual_obj.size() == 0) {
int r = -EINVAL;
bufferlist etag;
time_t ctime;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
RGWRadosCtx *new_ctx = NULL;
RGWObjState *astate = NULL;
off_t ofs = 0;
std::string dst_oid, dst_key;
get_obj_bucket_and_oid_key(dst_obj, bucket, dst_oid, dst_key);
librados::IoCtx io_ctx;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
uint64_t size = 0;
string etag;
string content_type;
rgw_obj read_obj = obj;
uint64_t read_ofs = ofs;
uint64_t len, read_len;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
RGWRadosCtx *new_ctx = NULL;
bool reading_from_head = true;
ObjectReadOperation op;
off_t read_ofs, off_t len,
bool is_head_obj, void *arg)
{
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
ObjectReadOperation op;
struct get_obj_data *d = (struct get_obj_data *)arg;
rgw_obj read_obj = obj;
uint64_t read_ofs = ofs;
uint64_t len;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
RGWRadosCtx *new_ctx = NULL;
bool reading_from_head = true;
RGWObjState *astate = NULL;
std::string oid, key;
get_obj_bucket_and_oid_key(obj, bucket, oid, key);
librados::IoCtx io_ctx;
- RGWRadosCtx *rctx = (RGWRadosCtx *)ctx;
+ RGWRadosCtx *rctx = static_cast<RGWRadosCtx *>(ctx);
RGWObjState *astate = NULL;
int r = open_bucket_ctx(bucket, io_ctx);
if (r < 0)