summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 21:02:34 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-07 21:02:34 +0000
commit0942811e9a1fb9c92098b891fea0ec32d752db63 (patch)
treeee0a021c9027591e62a6a08f5ba1bf5d2a0f180c /io.c
parentf77e42ad2d01d52d088eb3001af651ec24132357 (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_6@17006 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 088b678c51..62fafbe594 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) {