From 26bbc81e122d7f14616dc799e41ef438398669ee Mon Sep 17 00:00:00 2001 From: cremno Date: Wed, 3 Sep 2014 10:00:37 +0200 Subject: get rid of shadowing variables Mostly by renaming the shadowing variable. If a shadowing variable was deleted, the shadowed one can be used instead. --- src/vm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/vm.c') diff --git a/src/vm.c b/src/vm.c index 7f7423838..78fb0c31f 100644 --- a/src/vm.c +++ b/src/vm.c @@ -2113,7 +2113,7 @@ RETRY_TRY_BLOCK: else { struct RArray *ary = mrb_ary_ptr(v); int len = ary->len; - int i; + int idx; if (len > pre + post) { regs[a++] = mrb_ary_new_from_values(mrb, len - pre - post, ary->ptr+pre); @@ -2123,11 +2123,11 @@ RETRY_TRY_BLOCK: } else { regs[a++] = mrb_ary_new_capa(mrb, 0); - for (i=0; i+preptr[pre+i]; + for (idx=0; idx+preptr[pre+idx]; } - while (i < post) { - SET_NIL_VALUE(regs[a+i]); + while (idx < post) { + SET_NIL_VALUE(regs[a+idx]); i++; } } -- cgit v1.2.3