summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--process.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index a5735ec98e..cfadd673c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Tue Jul 1 17:14:59 2008 URABE Shyouhei <shyouhei@ruby-lang.org>
+Tue Jul 1 17:30:30 2008 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * process.c (run_exec_rlimit): ISO C90 forbids mixed declarations
+ and code
* include/ruby/ruby.h (enum ruby_special_consts): ISO C forbids
comma at end of enumerator list
diff --git a/process.c b/process.c
index 981ea8b2da..b5ea540a15 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);