Fixed fflush for non dirty file streams.

svn path=/trunk/; revision=3037
This commit is contained in:
Hartmut Birr
2002-06-10 21:21:06 +00:00
parent b971a7adc6
commit f0cb69cade
+4 -4
View File
@@ -85,15 +85,15 @@ int fflush(FILE *f)
// possibly commit the flushed data
// better open the file in write through mode
do {
while (rn > 0) {
n = _write(fileno(f), base, rn);
if (n <= 0) {
f->_flag |= _IOERR;
return EOF;
f->_flag |= _IOERR;
return EOF;
}
rn -= n;
base += n;
} while (rn > 0);
};
f->_flag &= ~_IODIRTY;
}