From 618c0fa27aa940b6734ca6e6413a07eea415d9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BCrgin?= Date: Thu, 20 May 2021 14:52:18 +0200 Subject: [PATCH] Suppress empty brackets in syslog startup message --- opendmarc/opendmarc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/opendmarc/opendmarc.c b/opendmarc/opendmarc.c index 65f6b49..48fe138 100644 --- a/opendmarc/opendmarc.c +++ b/opendmarc/opendmarc.c @@ -5255,8 +5255,11 @@ main(int argc, char **argv) n -= status; } - syslog(LOG_INFO, "%s v%s starting (%s)", DMARCF_PRODUCT, - VERSION, argstr); + syslog(LOG_INFO, "%s v%s starting%s%s%s", DMARCF_PRODUCT, + VERSION, + strlen(argstr) == 0 ? "" : " (", + argstr, + strlen(argstr) == 0 ? "" : ")"); memset(argstr, '\0', sizeof argstr); strlcpy(argstr, "(none)", sizeof argstr);