Skip to content

Commit

Permalink
Only call va_start when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
gaul committed Nov 24, 2019
1 parent 7ac2eb0 commit 49f544f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 49f544f

Please sign in to comment.