diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-05-21 00:42:06 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-05-21 00:42:06 -0400 |
commit | aec84f53952315ac1bd91036e37113d9cb3a303b (patch) | |
tree | c14c6c1a134a245094506dad430c951493b2eeed /stdio-common/vfprintf.c | |
parent | 34a9094f49241ebb72084c536cf468fd51ebe3ec (diff) | |
download | glibc-aec84f53952315ac1bd91036e37113d9cb3a303b.tar.gz glibc-aec84f53952315ac1bd91036e37113d9cb3a303b.tar.xz glibc-aec84f53952315ac1bd91036e37113d9cb3a303b.zip |
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.c | 1 |
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; \ } \ |