aboutsummaryrefslogtreecommitdiff
path: root/src/diag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diag.c')
-rw-r--r--src/diag.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/diag.c b/src/diag.c
index 0aebb7a..03a9c97 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -47,10 +47,14 @@ vlogmsg (int prio, const char *fmt, va_list ap)
{
if (DIAG_OUTPUT (DIAG_TO_STDERR))
{
+ va_list aq;
fprintf (stderr, "%s: ", program_name);
- vfprintf (stderr, fmt, ap);
+ va_copy (aq, ap);
+ vfprintf (stderr, fmt, aq);
+ va_end (aq);
fprintf (stderr, "\n");
}
+
if (DIAG_OUTPUT (DIAG_TO_SYSLOG))
syslog_printer (prio, fmt, ap);
}

Return to:

Send suggestions and report system problems to the System administrator.