From: Martin Mares Date: Mon, 16 Feb 2009 22:55:23 +0000 (+0100) Subject: Logging: Honor LSFMT_PID only when the PID is known. X-Git-Tag: holmes-import~68 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=3033584765d63d53a25179537e928b6a1f632337;p=libucw.git Logging: Honor LSFMT_PID only when the PID is known. --- 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);