aboutsummaryrefslogtreecommitdiff
path: root/libbb/xfuncs_printf.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-01-02 18:49:22 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-01-02 18:49:22 +0100
commitc066472b0cfba62260ccb86d567a11c8b3d395e3 (patch)
tree7e7827ab2a317eebeb1add39179790c62bc34e4f /libbb/xfuncs_printf.c
parent1ee5afdce28d5a11987071f710c1d2fd493618cc (diff)
downloadbusybox-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/xfuncs_printf.c')
-rw-r--r--libbb/xfuncs_printf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c
index d36284131..7207ec58a 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,