From a2bf473742575b09fc2f2bd6554d7256facb7f2e Mon Sep 17 00:00:00 2001 From: ps Date: Sat, 20 Sep 2003 23:35:37 +0000 Subject: Fix improper use of varargs. Reviewed by: peter --- sbin/dump/optr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin/dump') diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index bc00b1a..97b7438 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); } -- cgit v1.1