From 926074e580140962a3046e0c64b5de6b20327acb Mon Sep 17 00:00:00 2001 From: Paul Saab Date: Sat, 20 Sep 2003 23:35:37 +0000 Subject: [PATCH] Fix improper use of varargs. Reviewed by: peter --- sbin/dump/optr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index bc00b1ab1780..97b74381daef 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -233,10 +233,10 @@ msg(const char *fmt, ...) (void) fprintf(stderr, "pid=%d ", getpid()); #endif va_start(ap, fmt); - (void) vfprintf(stderr, fmt, ap); + (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap); + (void) fprintf(stderr, lastmsg); (void) fflush(stdout); (void) fflush(stderr); - (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap); va_end(ap); }