From f529864ffb0781b74ecb298fab1c694d5d242422 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 28 Jun 2007 06:00:09 +0000 Subject: * ext/stringio/stringio.c (strio_getline): local variable to be initialized. [ruby-dev:31077] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/stringio/stringio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ext/stringio') diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c index 658d923dd..25c251c4f 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 { -- cgit