summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--klibc/klibc/syslog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/klibc/klibc/syslog.c b/klibc/klibc/syslog.c
index 592992ba6b..e9d84d9ddc 100644
--- a/klibc/klibc/syslog.c
+++ b/klibc/klibc/syslog.c
@@ -60,7 +60,8 @@ void vsyslog(int prio, const char *format, va_list ap)
len += vsnprintf(buf+len, BUFLEN-len, format, ap);
if ( len > BUFLEN-1 ) len = BUFLEN-1;
- buf[len++] = '\n';
+ if (buf[len-1] != '\n')
+ buf[len++] = '\n';
fd = __syslog_fd;
if ( fd == -1 )