diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-15 05:46:11 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-15 05:46:11 +0000 |
commit | 5b07c52a06e9419fadb75bd153f4b4cfc1f6631d (patch) | |
tree | 19c95ab5e4c777fc2e33f6bd0e5a2cf6eebb6c2c /libc/stdio/_stdio.c | |
parent | ed0abe10a7d8e3997f5894199e4195833e7f8312 (diff) | |
download | uClibc-alpine-5b07c52a06e9419fadb75bd153f4b4cfc1f6631d.tar.bz2 uClibc-alpine-5b07c52a06e9419fadb75bd153f4b4cfc1f6631d.tar.xz |
suppress bogus ioctl on fd==INT_MAX when vasprintf() is called
Diffstat (limited to 'libc/stdio/_stdio.c')
-rw-r--r-- | libc/stdio/_stdio.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/stdio/_stdio.c b/libc/stdio/_stdio.c index 4707cde10..79045f796 100644 --- a/libc/stdio/_stdio.c +++ b/libc/stdio/_stdio.c @@ -259,8 +259,10 @@ void attribute_hidden _stdio_init(void) #ifdef __STDIO_BUFFERS int old_errno = errno; /* stdin and stdout uses line buffering when connected to a tty. */ - _stdio_streams[0].__modeflags ^= (1-isatty(0)) * __FLAG_LBF; - _stdio_streams[1].__modeflags ^= (1-isatty(1)) * __FLAG_LBF; + if (!isatty(0)) + _stdio_streams[0].__modeflags ^= __FLAG_LBF; + if (!isatty(1)) + _stdio_streams[1].__modeflags ^= __FLAG_LBF; __set_errno(old_errno); #endif #ifndef __UCLIBC__ |