summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/syslog.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/syslog.c')
-rw-r--r--lib/libc/gen/syslog.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c
index 8c5a2e3..2c16d73 100644
--- a/lib/libc/gen/syslog.c
+++ b/lib/libc/gen/syslog.c
@@ -222,6 +222,10 @@ vsyslog(pri, fmt, ap)
cnt = sizeof(tbuf) - tbuf_cookie.left;
+ /* Remove a trailing newline */
+ if (tbuf[cnt - 1] == '\n')
+ cnt--;
+
/* Output to stderr if requested. */
if (LogStat & LOG_PERROR) {
struct iovec iov[2];
OpenPOWER on IntegriCloud