diff options
author | ps <ps@FreeBSD.org> | 2003-09-20 23:35:37 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2003-09-20 23:35:37 +0000 |
commit | a2bf473742575b09fc2f2bd6554d7256facb7f2e (patch) | |
tree | 49d2ec2cbf3e7681c3436f41acc20d51749435a2 /sbin/dump | |
parent | bfb0c45b8f8ba187719b11024bd580bc96fd32d3 (diff) | |
download | FreeBSD-src-a2bf473742575b09fc2f2bd6554d7256facb7f2e.zip FreeBSD-src-a2bf473742575b09fc2f2bd6554d7256facb7f2e.tar.gz |
Fix improper use of varargs.
Reviewed by: peter
Diffstat (limited to 'sbin/dump')
-rw-r--r-- | sbin/dump/optr.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |