[PATCH] agetty: Remove superfluous fflush()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <sbrabec@xxxxxxx>
---
 term-utils/agetty.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/term-utils/agetty.c b/term-utils/agetty.c
index 43dbd6dea..96bf41b36 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;
 	}
-- 
2.21.0

-- 
Best Regards / S pozdravem,

Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o.                         e-mail: sbrabec@xxxxxxxx
Křižíkova 148/34 (Corso IIa)                    tel: +420 284 084 060
186 00 Praha 8-Karlín                          fax:  +420 284 084 001
Czech Republic                                    http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux