about summary refs log tree commit diff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-10-13 07:20:46 +0000
committerUlrich Drepper <drepper@redhat.com>2007-10-13 07:20:46 +0000
commited36f224c30088f10ecb0f190091508e917379a3 (patch)
tree6390edb48cdfa439d669a523690b1359980ff222 /libio
parent0ea4967708e69a518d7a141ebab328e6d58b5401 (diff)
downloadglibc-ed36f224c30088f10ecb0f190091508e917379a3.tar.gz
glibc-ed36f224c30088f10ecb0f190091508e917379a3.tar.xz
glibc-ed36f224c30088f10ecb0f190091508e917379a3.zip
write-only streams. For read/write streams, check whether we
	performed a read operation already.
Diffstat (limited to 'libio')
-rw-r--r--libio/__freading.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libio/__freading.c b/libio/__freading.c
index 7eca27b010..43e50bce75 100644
--- a/libio/__freading.c
+++ b/libio/__freading.c
@@ -21,7 +21,7 @@
 int
 __freading (FILE *fp)
 {
-  return (((fp->_flags & _IO_NO_WRITES)
-	   || (fp->_flags & _IO_CURRENTLY_PUTTING) == 0)
-	  && (fp->_flags & _IO_NO_READS) == 0);
+  return ((fp->_flags & _IO_NO_WRITES)
+	  || ((fp->_flags & (_IO_CURRENTLY_PUTTING | _IO_NO_READS)) == 0
+	      && fp->_IO_read_base != NULL));
 }