From: Karel Zak Date: Mon, 16 Jul 2007 12:41:28 +0000 (+0200) Subject: login-utils: remove unwanted newlines from wall X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=529bdd94f4a2c6329f33623b8a70b51f3e60289f;p=util-linux login-utils: remove unwanted newlines from wall Prevent wall from adding an empty newline to every new line. Signed-off-by: Karel Zak --- 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", " ");