]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_IO_flush_all_linebuffered): Don't flush on a read-only stream.
authorUlrich Drepper <drepper@redhat.com>
Thu, 17 Apr 1997 23:21:30 +0000 (23:21 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 17 Apr 1997 23:21:30 +0000 (23:21 +0000)
libio/genops.c

index db7fb180a32abd667487b94a0d526c1247ace665..c08598686dfd01faf71c4ce74aa5c5c75cedf57d 100644 (file)
@@ -615,7 +615,7 @@ DEFUN_VOID(_IO_flush_all_linebuffered)
 {
   _IO_FILE *fp;
   for (fp = _IO_list_all; fp != NULL; fp = fp->_chain)
-    if (fp->_flags & _IO_LINE_BUF)
+    if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF)
       _IO_OVERFLOW (fp, EOF);
 }