summaryrefslogtreecommitdiffstats
path: root/sbin/dump
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2004-12-30 00:53:56 +0000
committerobrien <obrien@FreeBSD.org>2004-12-30 00:53:56 +0000
commit87bec6eaa19b96a0aa72cdcd7471b59a2c55623c (patch)
tree8e4d09c3390a245cd5d4b025c153331142a01ce3 /sbin/dump
parent3ba777976f7e9c9796117a0b1c3fb5521e983d15 (diff)
downloadFreeBSD-src-87bec6eaa19b96a0aa72cdcd7471b59a2c55623c.zip
FreeBSD-src-87bec6eaa19b96a0aa72cdcd7471b59a2c55623c.tar.gz
Clearer va-args usage.
Submitted by: bde
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/optr.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 8c1f3c1..3029dd3 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -233,20 +233,19 @@ void
msg(const char *fmt, ...)
{
va_list ap;
- va_list ap2;
(void) fprintf(stderr," DUMP: ");
#ifdef TDEBUG
(void) fprintf(stderr, "pid=%d ", getpid());
#endif
va_start(ap, fmt);
- va_copy(ap2, ap);
(void) vfprintf(stderr, fmt, ap);
(void) fflush(stdout);
(void) fflush(stderr);
- (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap2);
va_end(ap);
- va_end(ap2);
+ va_start(ap, fmt);
+ (void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap);
+ va_end(ap);
}
void
OpenPOWER on IntegriCloud