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, ...)
|
void mbp_log(int level, const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
|
||||||
if (daemonize) {
|
if (daemonize) {
|
||||||
|
va_start(args, fmt);
|
||||||
vsyslog(level, fmt, args);
|
vsyslog(level, fmt, args);
|
||||||
}
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vprintf(fmt, args);
|
vprintf(fmt, args);
|
||||||
|
|
Loading…
Add table
Reference in a new issue