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/map-mbone Pull up revision 1.5 (requested by he):



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

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

diffstat:

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

diffs (39 lines):

diff -r 98d01bf81eb7 -r 41c5744d8592 usr.sbin/map-mbone/mapper.c
--- a/usr.sbin/map-mbone/mapper.c       Thu Oct 19 17:05:21 2000 +0000
+++ b/usr.sbin/map-mbone/mapper.c       Thu Oct 19 17:05:24 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mapper.c,v 1.4 1998/05/09 17:22:07 kleink Exp $        */
+/*     $NetBSD: mapper.c,v 1.4.2.1 2000/10/19 17:05:24 he Exp $        */
 
 /* Mapper for connections between MRouteD multicast routers.
  * Written by Pavel Curtis <Pavel%PARC.Xerox.Com@localhost>
@@ -91,6 +91,10 @@
                                                int *pargc));
 u_int32_t                      host_addr __P((char *name));
 
+#ifdef __STDC__
+void log(int severity, int syserr, const char *format, ...)
+       __attribute__((__format__(__printf__, 3, 4)));
+#endif
 
 Node *find_node(addr, ptr)
     u_int32_t addr;
@@ -160,7 +164,7 @@
  */
 #ifdef __STDC__
 void
-log(int severity, int syserr, char *format, ...)
+log(int severity, int syserr, const char *format, ...)
 {
        va_list ap;
        char    fmt[100];
@@ -189,7 +193,8 @@
            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