From aff9875f6912cfc97baf807baa2b6d29a7ed44a7 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Tue, 1 Jul 2008 08:31:55 +0000 Subject: * process.c (run_exec_rlimit): ISO C90 forbids mixed declarations and code git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- process.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'process.c') diff --git a/process.c b/process.c index 981ea8b2d..b5ea540a1 100644 --- a/process.c +++ b/process.c @@ -2052,12 +2052,13 @@ run_exec_rlimit(VALUE ary, VALUE save) int rtype = NUM2INT(RARRAY_PTR(elt)[0]); struct rlimit rlim; if (!NIL_P(save)) { + VALUE tmp, newary; if (getrlimit(rtype, &rlim) == -1) return -1; - VALUE tmp = hide_obj(rb_ary_new3(3, RARRAY_PTR(elt)[0], - RLIM2NUM(rlim.rlim_cur), - RLIM2NUM(rlim.rlim_max))); - VALUE newary = rb_ary_entry(save, EXEC_OPTION_RLIMIT); + tmp = hide_obj(rb_ary_new3(3, RARRAY_PTR(elt)[0], + RLIM2NUM(rlim.rlim_cur), + RLIM2NUM(rlim.rlim_max))); + newary = rb_ary_entry(save, EXEC_OPTION_RLIMIT); if (NIL_P(newary)) { newary = hide_obj(rb_ary_new()); rb_ary_store(save, EXEC_OPTION_RLIMIT, newary); -- cgit