Skip to content

Commit

Permalink
Removed useless casts
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 5, 2020
1 parent 72757fb commit 5c49bb5
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions marshal.c
Expand Up @@ -1503,13 +1503,12 @@ r_string(struct load_arg *arg)
static VALUE
r_entry0(VALUE v, st_index_t num, struct load_arg *arg)
{
st_data_t real_obj = (VALUE)Qundef;
if (arg->compat_tbl && st_lookup(arg->compat_tbl, v, &real_obj)) {
st_insert(arg->data, num, (st_data_t)real_obj);
}
else {
st_insert(arg->data, num, (st_data_t)v);
st_data_t real_obj = (st_data_t)v;
if (arg->compat_tbl) {
/* real_obj is kept if not found */
st_lookup(arg->compat_tbl, v, &real_obj);
}
st_insert(arg->data, num, real_obj);
return v;
}

Expand Down

0 comments on commit 5c49bb5

Please sign in to comment.