summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-09 04:35:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-09 04:35:53 +0000
commit9a8a2fd294ffa68bfed3d503090366faf0f45964 (patch)
tree12835099e72f7c7b9f74c472efe5cf78fbb7bd59
parent66f4c3f18c1f6eb4216556dd65463e6601ebca34 (diff)
ext/zlib/zlib.c: initialize return value
* ext/zlib/zlib.c (zstream_run_func): initialize the return value, interrupt flag may set before starting loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ext/zlib/zlib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 1b651d1..fc49e44 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -924,6 +924,7 @@ zstream_run_func(void *ptr)
struct zstream *z = args->z;
uInt n;
+ err = Z_OK;
while (!args->interrupt) {
n = z->stream.avail_out;
err = z->func->run(&z->stream, flush);