diff options
Diffstat (limited to 'libio')
-rw-r--r-- | libio/__freading.c | 6 |
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)); } |