libsyslog: drop extra leading space in message

When logging to a file we want a space to separate proc[pid]: from the
message, but for regular logging local/remote we don't want to inject
an extra space.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg 2022-08-01 12:35:33 +02:00
parent 22ee326192
commit a2ff3a93f6
1 changed files with 1 additions and 0 deletions

View File

@ -322,6 +322,7 @@ vsyslogp_r(int pri, struct syslog_data *data, const char *msgid,
iov[iovcnt].iov_len = prlen;
iovcnt++;
}
prlen--; /* drop extra space for regular log messages */
DEC();
goto output;
}