mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 23:00:22 +00:00
(_IO_new_file_close_it): Only call _IO_do_flush if stream was last used for
writing.
This commit is contained in:
parent
29cd43d7a9
commit
6797b8a30f
@ -159,7 +159,11 @@ _IO_new_file_close_it (fp)
|
||||
if (!_IO_file_is_open (fp))
|
||||
return EOF;
|
||||
|
||||
write_status = _IO_do_flush (fp);
|
||||
if ((fp->_flags & _IO_NO_WRITES) == 0
|
||||
&& (fp->_flags & _IO_CURRENTLY_PUTTING) != 0)
|
||||
write_status = _IO_do_flush (fp);
|
||||
else
|
||||
write_status = 0;
|
||||
|
||||
_IO_unsave_markers(fp);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user