Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.sbin/mtrace Pull up revision 1.15 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/167933e04a00
branches:  netbsd-1-4
changeset: 471135:167933e04a00
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 19 17:05:37 2000 +0000

description:
Pull up revision 1.15 (requested by he):
  Format string cleanup.

diffstat:

 usr.sbin/mtrace/mtrace.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r 26d8e96205d0 -r 167933e04a00 usr.sbin/mtrace/mtrace.c
--- a/usr.sbin/mtrace/mtrace.c  Thu Oct 19 17:05:34 2000 +0000
+++ b/usr.sbin/mtrace/mtrace.c  Thu Oct 19 17:05:37 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mtrace.c,v 1.12.2.1 2000/01/23 12:03:21 he Exp $       */
+/*     $NetBSD: mtrace.c,v 1.12.2.2 2000/10/19 17:05:37 he Exp $       */
 
 /*
  * mtrace.c
@@ -52,7 +52,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: mtrace.c,v 1.12.2.1 2000/01/23 12:03:21 he Exp $");
+__RCSID("$NetBSD: mtrace.c,v 1.12.2.2 2000/10/19 17:05:37 he Exp $");
 #endif
 
 #include <sys/types.h>
@@ -168,6 +168,10 @@
 void                   passive_mode __P((void));
 
 int                    main __P((int argc, char *argv[]));
+#ifdef __STDC__
+void log(int severity, int syserr, char *format, ...)
+       __attribute__((__format__(__printf__, 3, 4)));
+#endif
 
 
 
@@ -1735,7 +1739,8 @@
            fmt[0] = '\0';
            if (severity == LOG_WARNING) strcat(fmt, "warning - ");
            strncat(fmt, format, 80);
-           vfprintf(stderr, fmt, ap);
+           format = fmt;
+           vfprintf(stderr, format, ap);
            if (syserr == 0)
                fprintf(stderr, "\n");
            else



Home | Main Index | Thread Index | Old Index