From ce608213872d4efe80708f872ee2e32c547dd734 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Tue, 7 Apr 2020 20:20:34 +0900 Subject: [PATCH] Removed unnecessary cast --- variable.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/variable.c b/variable.c index 2dba76668b..aed71751c0 100644 --- a/variable.c +++ b/variable.c @@ -2123,9 +2123,8 @@ autoload_defined_p(VALUE mod, ID id) static void const_tbl_update(struct autoload_const *); static VALUE -autoload_const_set(VALUE arg) +autoload_const_set(struct autoload_const *ac) { - struct autoload_const *ac = (struct autoload_const *)arg; VALUE klass = ac->mod; ID id = ac->id; check_before_mod_set(klass, id, ac->value, "constant"); @@ -2169,7 +2168,7 @@ autoload_reset(VALUE arg) list_for_each_safe(&ele->constants, ac, next, cnode) { if (ac->value != Qundef) { - autoload_const_set((VALUE)ac); + autoload_const_set(ac); } } }