diff --git lib/libc/gen/syslog.c lib/libc/gen/syslog.c index 2424cef78dd7..08bdfdbeb1e7 100644 --- lib/libc/gen/syslog.c +++ lib/libc/gen/syslog.c @@ -218,7 +218,7 @@ vsyslog1(int pri, const char *fmt, va_list ap) * specified, as it provides valuable information. Many * applications tend not to use this, even though they should. */ - if (LogPid == -1) + if (LogTagLength <= 0) LogPid = getpid(); (void)fprintf(fp, "%d ", (int)LogPid); /* Message ID. */