From a56721b61cd9b93094ff33b02364d4922fe934e2 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Fri, 15 Oct 2021 20:43:41 +0200 Subject: [PATCH] util: Don't duplicate debug messages, they're already on stderr Signed-off-by: Stefano Brivio --- util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util.c b/util.c index a3b3eb8..0a05ffb 100644 --- a/util.c +++ b/util.c @@ -54,12 +54,12 @@ void name(const char *format, ...) { \ fprintf(stderr, "%lu.%04lu: ", \ tp.tv_sec - log_debug_start, \ tp.tv_nsec / (100 * 1000)); \ + } else { \ + va_start(args, format); \ + __vsyslog(level, format, args); \ + va_end(args); \ } \ \ - va_start(args, format); \ - __vsyslog(level, format, args); \ - va_end(args); \ - \ if (setlogmask(0) & LOG_MASK(LOG_DEBUG) || \ setlogmask(0) == LOG_MASK(LOG_EMERG)) { \ va_start(args, format); \