about summary refs log tree commit diff
path: root/libio/genops.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/genops.c')
-rw-r--r--libio/genops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/genops.c b/libio/genops.c
index b1ae5afc50..768996f8b4 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -754,7 +754,7 @@ _IO_flush_all ()
   int result = 0;
   struct _IO_FILE *fp;
   for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
-    if (((fp->_mode < 0 && fp->_IO_write_ptr > fp->_IO_write_base)
+    if (((fp->_mode <= 0 && fp->_IO_write_ptr > fp->_IO_write_base)
 #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
 	 || (fp->_vtable_offset == 0
 	     && fp->_mode > 0 && (fp->_wide_data->_IO_write_ptr