From 529bdd94f4a2c6329f33623b8a70b51f3e60289f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 16 Jul 2007 14:41:28 +0200 Subject: [PATCH] login-utils: remove unwanted newlines from wall Prevent wall from adding an empty newline to every new line. Signed-off-by: Karel Zak --- login-utils/wall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/login-utils/wall.c b/login-utils/wall.c index 2797f465..c9893d7e 100644 --- a/login-utils/wall.c +++ b/login-utils/wall.c @@ -221,7 +221,8 @@ makemsg(fname) putc('\n', fp); cnt = 0; } - carefulputc(ch, fp); + if (ch != '\n') + carefulputc(ch, fp); } } fprintf(fp, "%79s\r\n", " "); -- 2.39.5