From 49f544fd8d596fa13d5525a5b042eee311568c67 Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sun, 24 Nov 2019 16:09:31 +0900 Subject: [PATCH] Only call va_start when needed --- src/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.c b/src/util.c index 3022632..136bcc6 100644 --- a/src/util.c +++ b/src/util.c @@ -8,11 +8,11 @@ void mbp_log(int level, const char *fmt, ...) { va_list args; - va_start(args, fmt); if (daemonize) { + va_start(args, fmt); vsyslog(level, fmt, args); + va_end(args); } - va_end(args); va_start(args, fmt); vprintf(fmt, args);