aboutsummaryrefslogtreecommitdiffstats
path: root/ext/stringio
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-28 06:00:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-28 06:00:09 +0000
commita0aa5f977e6644f1cb9803a8c08b866623ed8227 (patch)
tree668c5b03bb8cbacee2f17ff39e1f5111b55b0e1b /ext/stringio
parent14010ce4a390e470e29959fbfef253b15ed3847f (diff)
downloadruby-a0aa5f977e6644f1cb9803a8c08b866623ed8227.tar.gz
* ext/stringio/stringio.c (strio_getline): local variable to be
initialized. [ruby-dev:31077] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/stringio')
-rw-r--r--ext/stringio/stringio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index 658d923dd6..25c251c4f5 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -769,12 +769,11 @@ static VALUE
strio_getline(int argc, VALUE *argv, struct StringIO *ptr)
{
const char *s, *e, *p;
- long n, limit;
+ long n, limit = 0;
VALUE str;
if (argc == 0) {
str = rb_rs;
- limit = 0;
}
else {
VALUE lim, tmp;
@@ -790,7 +789,6 @@ strio_getline(int argc, VALUE *argv, struct StringIO *ptr)
}
else {
str = tmp;
- limit = 0;
}
}
else {