From: Stanislav Brabec Date: Thu, 20 Jun 2019 20:16:42 +0000 (+0200) Subject: agetty: Remove superfluous fflush() X-Git-Tag: v2.35-rc1~323 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Futil-linux.git;a=commitdiff_plain;h=b0853a08dba1163613069ba24cb09cc2f0282d98 agetty: Remove superfluous fflush() eval_issue_file() contains fflush(stdout). It comes from an old code that used fputs() to write to the console. In the new code, we write to a temporary memstream, and fclose(ie->output) fully replaces possible fflush(ie->output) in this implementation. The new print_issue_file() does not need it as well, as it uses unbuffered write_all(). Signed-off-by: Stanislav Brabec --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 43dbd6dead..96bf41b367 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -1903,8 +1903,6 @@ static void eval_issue_file(struct issue *ie, f = NULL; } while (dirname); - fflush(stdout); - if ((op->flags & F_VCONSOLE) == 0) ie->do_tcrestore = 1; }