summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 21:01:48 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 21:01:48 +0000
commitf161d2b7a68aa42add7fc3e262a644fb739421b2 (patch)
treee35032e7b4f1e7e3bd165ff18698b4cad95afd12 /io.c
parentcf4fa0f0454058a2948d0ca517c6dce55e826043 (diff)
merge revision(s) 14858:
* io.c (fptr_finalize): clear errno first. [ruby-talk:284492] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r--io.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io.c b/io.c
index 47f06c60ce..0c5172f29f 100644
--- a/io.c
+++ b/io.c
@@ -2169,6 +2169,7 @@ fptr_finalize(fptr, noraise)
{
int n1 = 0, n2 = 0, f1, f2 = -1;
+ errno = 0;
if (fptr->f2) {
f2 = fileno(fptr->f2);
while (n2 = 0, fflush(fptr->f2) < 0) {