From: Rob Landley Date: Sat, 7 May 2005 07:53:16 +0000 (-0000) Subject: Shaun Jackman pointed out that dprintf(STDOUT_FILENO,...) is just a printf. X-Git-Tag: 1_1_0~1005 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cce1ae2ce541563eb70dcb181b5031fe1ad98e4a;p=oweals%2Fbusybox.git Shaun Jackman pointed out that dprintf(STDOUT_FILENO,...) is just a printf. --- diff --git a/coreutils/tail.c b/coreutils/tail.c index e3f89d2ee..ef0038385 100644 --- a/coreutils/tail.c +++ b/coreutils/tail.c @@ -62,7 +62,8 @@ static int status static void tail_xprint_header(const char *fmt, const char *filename) { /* If we get an output error, there is really no sense in continuing. */ - if (dprintf(STDOUT_FILENO, fmt, filename) < 0) { + if (printf(fmt, filename) < 0 || + fflush(stdout) < 0) { bb_perror_nomsg_and_die(); } }