mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-28 12:23:28 +00:00
Fixed fflush for non dirty file streams.
svn path=/trunk/; revision=3037
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user