summaryrefslogtreecommitdiff
path: root/libio/__freading.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-10-14 20:56:52 +0000
committerJakub Jelinek <jakub@redhat.com>2007-10-14 20:56:52 +0000
commita33c43a5aefbbb2d1e00432ba034d256af0008ae (patch)
tree80aa9060de68814fb13960b308a0faa95fb8ba94 /libio/__freading.c
parent4cee966cabbbd52c38260dff95f5ab43772ba5d9 (diff)
Updated to fedora-glibc-20071014T1847
Diffstat (limited to 'libio/__freading.c')
-rw-r--r--libio/__freading.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libio/__freading.c b/libio/__freading.c
index 37200bba78..43e50bce75 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
@@ -22,5 +22,6 @@ int
__freading (FILE *fp)
{
return ((fp->_flags & _IO_NO_WRITES)
- || (fp->_flags & _IO_CURRENTLY_PUTTING) == 0);
+ || ((fp->_flags & (_IO_CURRENTLY_PUTTING | _IO_NO_READS)) == 0
+ && fp->_IO_read_base != NULL));
}