diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-04-15 12:04:13 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-04-15 12:04:13 -0400 |
commit | 69cf09c821b94668f03c942585d99c13121731c8 (patch) | |
tree | 94021bedc39393fece76cce79a84b34d0d35ecf8 /src/stdio/__fdopen.c | |
parent | 088ae5995a75ab06882322fd3ef39f12df06bbbc (diff) | |
download | musl-69cf09c821b94668f03c942585d99c13121731c8.tar.gz musl-69cf09c821b94668f03c942585d99c13121731c8.tar.bz2 musl-69cf09c821b94668f03c942585d99c13121731c8.tar.xz musl-69cf09c821b94668f03c942585d99c13121731c8.zip |
avoid setting errno when checking for tty
setting errno here is completely valid, but some programs, notably
busybox printf, assume that errno will not be set during output and
treat this as an error condition. in any case, skipping it slightly
reduces code size and saves time.
Diffstat (limited to 'src/stdio/__fdopen.c')
-rw-r--r-- | src/stdio/__fdopen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdio/__fdopen.c b/src/stdio/__fdopen.c index 235d348f..a0102674 100644 --- a/src/stdio/__fdopen.c +++ b/src/stdio/__fdopen.c @@ -30,7 +30,7 @@ FILE *__fdopen(int fd, const char *mode) /* Activate line buffered mode for terminals */ f->lbf = EOF; - if (!(f->flags & F_NOWR) && !syscall(SYS_ioctl, fd, TCGETS, &tio)) + if (!(f->flags & F_NOWR) && !__syscall(SYS_ioctl, fd, TCGETS, &tio)) f->lbf = '\n'; /* Initialize op ptrs. No problem if some are unneeded. */ |