mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-math: combine variable declaration with initialization
This commit is contained in:
@@ -478,9 +478,8 @@ static mrb_value
|
||||
math_log(mrb_state *mrb, mrb_value obj)
|
||||
{
|
||||
mrb_float x, base;
|
||||
mrb_int argc;
|
||||
mrb_int argc = mrb_get_args(mrb, "f|f", &x, &base);
|
||||
|
||||
argc = mrb_get_args(mrb, "f|f", &x, &base);
|
||||
if (x < 0.0) {
|
||||
domain_error(mrb, "log");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user