Fix improper use of varargs.

Reviewed by:	peter
This commit is contained in:
Paul Saab 2003-09-20 23:35:37 +00:00
parent c43ab0b5a1
commit 926074e580
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120306

View File

@ -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);
}