summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-06-13 20:13:30 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-06-13 20:13:30 +0000
commit296d39fd27fb525b540ab674c92dd061b535211d (patch)
tree7edece7e6e5ae162c611d8f3695633c013d78adc /sbin
parentb35b225becf434ea14dcf85d59100220221fec3c (diff)
more va_start/end fixes, ok deraadt@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dump/optr.c10
-rw-r--r--sbin/routed/main.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index f8a33ea68df..ab704a3ae52 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optr.c,v 1.17 2001/01/19 17:57:34 deraadt Exp $ */
+/* $OpenBSD: optr.c,v 1.18 2001/06/13 20:13:28 markus Exp $ */
/* $NetBSD: optr.c,v 1.11 1997/05/27 08:34:36 mrg Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94";
#else
-static char rcsid[] = "$OpenBSD: optr.c,v 1.17 2001/01/19 17:57:34 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: optr.c,v 1.18 2001/06/13 20:13:28 markus Exp $";
#endif
#endif /* not lint */
@@ -254,8 +254,14 @@ msg(fmt, va_alist)
va_start(ap);
#endif
(void) vfprintf(stderr, fmt, ap);
+ va_end(ap);
(void) fflush(stdout);
(void) fflush(stderr);
+#ifdef __STDC__
+ va_start(ap, fmt);
+#else
+ va_start(ap);
+#endif
(void) vsnprintf(lastmsg, sizeof(lastmsg), fmt, ap);
va_end(ap);
}
diff --git a/sbin/routed/main.c b/sbin/routed/main.c
index 36c186409fa..3b590f05da8 100644
--- a/sbin/routed/main.c
+++ b/sbin/routed/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.10 2001/01/19 17:57:42 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.11 2001/06/13 20:13:29 markus Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ char copyright[] =
#if !defined(lint)
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.10 2001/01/19 17:57:42 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.11 2001/06/13 20:13:29 markus Exp $";
#endif
#include "defs.h"
@@ -812,11 +812,14 @@ msglog(char *p, ...)
va_start(args, p);
vsyslog(LOG_ERR, p, args);
+ va_end(args);
if (ftrace != 0) {
if (ftrace == stdout)
(void)fputs("routed: ", ftrace);
+ va_start(args, p);
(void)vfprintf(ftrace, p, args);
+ va_end(args);
(void)fputc('\n', ftrace);
}
}
@@ -831,9 +834,12 @@ logbad(int dump, char *p, ...)
va_start(args, p);
vsyslog(LOG_ERR, p, args);
+ va_end(args);
(void)fputs("routed: ", stderr);
+ va_start(args, p);
(void)vfprintf(stderr, p, args);
+ va_end(args);
(void)fputs("; giving up\n",stderr);
(void)fflush(stderr);