diff options
author | Denys Vlasenko | 2010-01-02 18:49:22 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-01-02 18:49:22 +0100 |
commit | c066472b0cfba62260ccb86d567a11c8b3d395e3 (patch) | |
tree | 7e7827ab2a317eebeb1add39179790c62bc34e4f /libbb | |
parent | 1ee5afdce28d5a11987071f710c1d2fd493618cc (diff) | |
download | busybox-c066472b0cfba62260ccb86d567a11c8b3d395e3.zip busybox-c066472b0cfba62260ccb86d567a11c8b3d395e3.tar.gz |
*: do not assign to stdout/stderr, it's not portable.
Based on patch by Aaron Carroll <xaaronc@gmail.com>
function old new delta
time_main 1062 1052 -10
cpio_main 563 549 -14
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xfuncs_printf.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c index d362841..7207ec5 100644 --- a/libbb/xfuncs_printf.c +++ b/libbb/xfuncs_printf.c @@ -263,10 +263,7 @@ int FAST_FUNC fflush_all(void) int FAST_FUNC bb_putchar(int ch) { - /* time.c needs putc(ch, stdout), not putchar(ch). - * it does "stdout = stderr;", but then glibc's putchar() - * doesn't work as expected. bad glibc, bad */ - return putc(ch, stdout); + return putchar(ch); } /* Die with an error message if we can't copy an entire FILE* to stdout, |