summaryrefslogtreecommitdiff
path: root/usr.sbin/mtrace
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-02-19 19:39:42 +0000
commit3923126b85f9e8a77cab9a41b5a62125acd5b4cd (patch)
tree1a8b19c5db03f8c989fc8228811837b182feb7a3 /usr.sbin/mtrace
parentcc03bdb70090357d2393b6ec82e3cde4d5ce5edd (diff)
We live in an ANSI C world. Remove lots of gratuitous #ifdef __STDC__ cruft.
Diffstat (limited to 'usr.sbin/mtrace')
-rw-r--r--usr.sbin/mtrace/mtrace.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/usr.sbin/mtrace/mtrace.c b/usr.sbin/mtrace/mtrace.c
index d0e5e9a140a..a224fe4ea4e 100644
--- a/usr.sbin/mtrace/mtrace.c
+++ b/usr.sbin/mtrace/mtrace.c
@@ -52,7 +52,7 @@
#ifndef lint
static char rcsid[] =
- "@(#) $Id: mtrace.c,v 1.11 2002/02/17 19:42:37 millert Exp $";
+ "@(#) $Id: mtrace.c,v 1.12 2002/02/19 19:39:40 millert Exp $";
#endif
#include <netdb.h>
@@ -63,11 +63,7 @@ static char rcsid[] =
#include <sys/ioctl.h>
#include "defs.h"
#include <arpa/inet.h>
-#ifdef __STDC__
#include <stdarg.h>
-#else
-#include <varargs.h>
-#endif
#ifdef SUNOS5
#include <sys/systeminfo.h>
#endif
@@ -1675,27 +1671,11 @@ check_vif_state()
* of the message and the current debug level. For errors of severity
* LOG_ERR or worse, terminate the program.
*/
-#ifdef __STDC__
void
log(int severity, int syserr, char *format, ...)
{
- va_list ap;
- char fmt[100];
-
- va_start(ap, format);
-#else
-/*VARARGS3*/
-void
-log(severity, syserr, format, va_alist)
- int severity, syserr;
- char *format;
- va_dcl
-{
- va_list ap;
- char fmt[100];
-
- va_start(ap);
-#endif
+ va_list ap;
+ char fmt[100];
switch (debug) {
case 0: if (severity > LOG_WARNING) return;
@@ -1705,6 +1685,7 @@ log(severity, syserr, format, va_alist)
fmt[0] = '\0';
if (severity == LOG_WARNING) strcat(fmt, "warning - ");
strncat(fmt, format, 80);
+ va_start(ap, format);
vfprintf(stderr, fmt, ap);
va_end(ap);
if (syserr == 0)