diff options
Diffstat (limited to 'libio/__freading.c')
-rw-r--r-- | libio/__freading.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libio/__freading.c b/libio/__freading.c index 37200bba78..7eca27b010 100644 --- a/libio/__freading.c +++ b/libio/__freading.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -21,6 +21,7 @@ int __freading (FILE *fp) { - return ((fp->_flags & _IO_NO_WRITES) - || (fp->_flags & _IO_CURRENTLY_PUTTING) == 0); + return (((fp->_flags & _IO_NO_WRITES) + || (fp->_flags & _IO_CURRENTLY_PUTTING) == 0) + && (fp->_flags & _IO_NO_READS) == 0); } |