mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-io: narrow a local variable scope
This commit is contained in:
@@ -102,12 +102,11 @@ io_get_open_fptr(mrb_state *mrb, mrb_value io)
|
||||
static void
|
||||
io_set_process_status(mrb_state *mrb, pid_t pid, int status)
|
||||
{
|
||||
struct RClass *c_process, *c_status;
|
||||
struct RClass *c_status = NULL;
|
||||
mrb_value v;
|
||||
|
||||
c_status = NULL;
|
||||
if (mrb_class_defined_id(mrb, MRB_SYM(Process))) {
|
||||
c_process = mrb_module_get_id(mrb, MRB_SYM(Process));
|
||||
struct RClass *c_process = mrb_module_get_id(mrb, MRB_SYM(Process));
|
||||
if (mrb_const_defined(mrb, mrb_obj_value(c_process), MRB_SYM(Status))) {
|
||||
c_status = mrb_class_get_under_id(mrb, c_process, MRB_SYM(Status));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user