diff options
| author | Diomidis Spinellis <dds@FreeBSD.org> | 2004-05-10 17:12:52 +0000 |
|---|---|---|
| committer | Diomidis Spinellis <dds@FreeBSD.org> | 2004-05-10 17:12:52 +0000 |
| commit | 857b57eae13f201c6c0f7017cc41559c985403e1 (patch) | |
| tree | fa51c27f23ef454fc75f997c7a325729cd80a0c2 /lib/libc/gen/syslog.c | |
| parent | 72d8d1c7f3928b386a2e64b75fcd03657658be24 (diff) | |
Notes
Diffstat (limited to 'lib/libc/gen/syslog.c')
| -rw-r--r-- | lib/libc/gen/syslog.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/gen/syslog.c b/lib/libc/gen/syslog.c index 8c5a2e340a68..2c16d73d4693 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]; |
