Skip to content

Commit 48f93ad

Browse files
committed
class.c (boot_defclass): unify variable declaration and initialization
1 parent 32200f1 commit 48f93ad

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/class.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,9 +1420,8 @@ mrb_get_args_a(mrb_state *mrb, mrb_args_format format, void **args)
14201420
static struct RClass*
14211421
boot_defclass(mrb_state *mrb, struct RClass *super)
14221422
{
1423-
struct RClass *c;
1423+
struct RClass *c = MRB_OBJ_ALLOC(mrb, MRB_TT_CLASS, mrb->class_class);
14241424

1425-
c = MRB_OBJ_ALLOC(mrb, MRB_TT_CLASS, mrb->class_class);
14261425
if (super) {
14271426
c->super = super;
14281427
mrb_field_write_barrier(mrb, (struct RBasic*)c, (struct RBasic*)super);

0 commit comments

Comments
 (0)