summaryrefslogtreecommitdiff
path: root/stdio-common/vfprintf.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-21 00:42:06 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-21 00:42:06 -0400
commitaec84f53952315ac1bd91036e37113d9cb3a303b (patch)
treec14c6c1a134a245094506dad430c951493b2eeed /stdio-common/vfprintf.c
parent34a9094f49241ebb72084c536cf468fd51ebe3ec (diff)
downloadglibc-aec84f53952315ac1bd91036e37113d9cb3a303b.tar.gz
Set stream errors in more cases
Also avoid unnecessarily setting errno when testing for TTY.
Diffstat (limited to 'stdio-common/vfprintf.c')
-rw-r--r--stdio-common/vfprintf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index cfa4c30b78..753a5ac150 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -52,6 +52,7 @@
CHECK_FILE (S, -1); \
if (S->_flags & _IO_NO_WRITES) \
{ \
+ S->_flags |= _IO_ERR_SEEN; \
__set_errno (EBADF); \
return -1; \
} \