void
_dbus_system_logv (DBusSystemLogSeverity severity, const char *msg, va_list args)
{
+ va_list tmp;
#ifdef HAVE_SYSLOG_H
int flags;
switch (severity)
return;
}
- vsyslog (flags, msg, args);
+ DBUS_VA_COPY (tmp, args);
+ vsyslog (flags, msg, tmp);
+ va_end (tmp);
#endif
#if !defined(HAVE_SYSLOG_H) || !HAVE_DECL_LOG_PERROR
{
/* vsyslog() won't write to stderr, so we'd better do it */
- va_list tmp;
-
DBUS_VA_COPY (tmp, args);
fprintf (stderr, "dbus[" DBUS_PID_FORMAT "]: ", _dbus_getpid ());
vfprintf (stderr, msg, tmp);