Only call va_start when needed
This commit is contained in:
parent
7ac2eb01fc
commit
49f544fd8d
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue