mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
write-only streams. For read/write streams, check whether we
performed a read operation already.
This commit is contained in:
@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
[BZ #4359]
|
[BZ #4359]
|
||||||
* libio/__freading.c (__freading): Don't return true for
|
* libio/__freading.c (__freading): Don't return true for
|
||||||
write-only streams.
|
write-only streams. For read/write streams, check whether we
|
||||||
|
performed a read operation already.
|
||||||
|
|
||||||
2007-10-12 Ulrich Drepper <drepper@redhat.com>
|
2007-10-12 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
int
|
int
|
||||||
__freading (FILE *fp)
|
__freading (FILE *fp)
|
||||||
{
|
{
|
||||||
return (((fp->_flags & _IO_NO_WRITES)
|
return ((fp->_flags & _IO_NO_WRITES)
|
||||||
|| (fp->_flags & _IO_CURRENTLY_PUTTING) == 0)
|
|| ((fp->_flags & (_IO_CURRENTLY_PUTTING | _IO_NO_READS)) == 0
|
||||||
&& (fp->_flags & _IO_NO_READS) == 0);
|
&& fp->_IO_read_base != NULL));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user