summaryrefslogtreecommitdiff
path: root/ext/stringio
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-27 04:04:33 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-27 04:04:33 +0000
commit69c8ab256d8e3609dec98a763288b87cd1278f6b (patch)
treec6054fa173a682e35f6562fac64787f3ddd2814e /ext/stringio
parent7c7b005a55a778fc81fb6bbe88a6a6a9d6c835d9 (diff)
* ext/stringio/stringio.c (strio_read_nonblock): declare local
variables at the first of function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-rw-r--r--ext/stringio/stringio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 5c2c64c..ebf678b 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -1353,7 +1353,7 @@ strio_sysread(int argc, VALUE *argv, VALUE self)
static VALUE
strio_read_nonblock(int argc, VALUE *argv, VALUE self)
{
- VALUE opts = Qnil;
+ VALUE opts = Qnil, val;
int no_exception = 0;
rb_scan_args(argc, argv, "11:", NULL, NULL, &opts);
@@ -1365,7 +1365,7 @@ strio_read_nonblock(int argc, VALUE *argv, VALUE self)
no_exception = 1;
}
- VALUE val = strio_read(argc, argv, self);
+ val = strio_read(argc, argv, self);
if (NIL_P(val)) {
if (no_exception)
return Qnil;