From 3033584765d63d53a25179537e928b6a1f632337 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 16 Feb 2009 23:55:23 +0100 Subject: [PATCH] Logging: Honor LSFMT_PID only when the PID is known. --- ucw/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucw/log.c b/ucw/log.c index 2563c799..5c4a0069 100644 --- a/ucw/log.c +++ b/ucw/log.c @@ -219,7 +219,7 @@ log_pass_msg(int depth, struct log_stream *ls, struct log_msg *m) /* Process name, PID ( |log_title| + 6 + (|PID|<=10) chars ) */ if ((ls->msgfmt & LSFMT_TITLE) && log_title) { - if (ls->msgfmt & LSFMT_PID) + if ((ls->msgfmt & LSFMT_PID) && log_pid) p += sprintf(p, "[%s (%d)] ", log_title, log_pid); else p += sprintf(p, "[%s] ", log_title); -- 2.39.2