Source-Changes-HG archive

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

[src/netbsd-1-4]: src/dist/bind/bin/named Pull up revision 1.2 (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/c4b2a74947f0
branches:  netbsd-1-4
changeset: 470962:c4b2a74947f0
user:      he <he%NetBSD.org@localhost>
date:      Tue Oct 10 21:12:35 2000 +0000

description:
Pull up revision 1.2 (requested by is):
  Format string cleanup.

diffstat:

 dist/bind/bin/named/ns_glob.h  |  13 ++++---------
 dist/bind/bin/named/ns_glue.c  |   4 +++-
 dist/bind/bin/named/ns_ixfr.c  |  12 ++++++------
 dist/bind/bin/named/ns_lexer.c |   9 +++++++--
 dist/bind/bin/named/ns_lexer.h |   8 +++++---
 5 files changed, 25 insertions(+), 21 deletions(-)

diffs (151 lines):

diff -r 3a3dcf36dc02 -r c4b2a74947f0 dist/bind/bin/named/ns_glob.h
--- a/dist/bind/bin/named/ns_glob.h     Tue Oct 10 21:12:30 2000 +0000
+++ b/dist/bind/bin/named/ns_glob.h     Tue Oct 10 21:12:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_glob.h,v 1.1.1.1.2.2 1999/12/04 16:54:40 he Exp $   */
+/*     $NetBSD: ns_glob.h,v 1.1.1.1.2.3 2000/10/10 21:12:35 he Exp $   */
 
 /*
  *     from ns.h       4.33 (Berkeley) 8/23/90
@@ -314,14 +314,9 @@
 #endif
 ;
 
-DECL   const char panic_msg_no_options[]
-       INIT("no server_options in NS_OPTION_P");
-
-DECL   const char panic_msg_insist_failed[]
-       INIT("%s:%d: insist '%s' failed: %s");
-
-DECL   const char panic_msg_bad_which[]
-       INIT("%s:%d: INCRSTATS(%s): bad \"which\"");
+#define  panic_msg_no_options          "no server_options in NS_OPTION_P"
+#define  panic_msg_insist_failed       "%s:%d: insist '%s' failed: %s"
+#define  panic_msg_bad_which           "%s:%d: INCRSTATS(%s): bad \"which\""
 
 DECL   u_long                  globalStats[nssLast];
 
diff -r 3a3dcf36dc02 -r c4b2a74947f0 dist/bind/bin/named/ns_glue.c
--- a/dist/bind/bin/named/ns_glue.c     Tue Oct 10 21:12:30 2000 +0000
+++ b/dist/bind/bin/named/ns_glue.c     Tue Oct 10 21:12:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_glue.c,v 1.1.1.1.2.2 1999/12/04 16:54:45 he Exp $   */
+/*     $NetBSD: ns_glue.c,v 1.1.1.1.2.3 2000/10/10 21:12:38 he Exp $   */
 
 #if !defined(lint) && !defined(SABER)
 static const char rcsid[] = "Id: ns_glue.c,v 8.14 1999/10/19 02:06:26 gson Exp";
@@ -181,6 +181,7 @@
                (print_errno) ? strerror(errno) : "");
 }
 
+#if 0
 /*
  * XXX This is for compatibility and will eventually be removed.
  */
@@ -188,6 +189,7 @@
 panic(const char *msg, const void *arg) {
        ns_panic(ns_log_default, 1, msg, arg);
 }
+#endif
 
 /*
  * How many labels in this name?
diff -r 3a3dcf36dc02 -r c4b2a74947f0 dist/bind/bin/named/ns_ixfr.c
--- a/dist/bind/bin/named/ns_ixfr.c     Tue Oct 10 21:12:30 2000 +0000
+++ b/dist/bind/bin/named/ns_ixfr.c     Tue Oct 10 21:12:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_ixfr.c,v 1.1.1.1.2.2 1999/12/04 16:54:54 he Exp $   */
+/*     $NetBSD: ns_ixfr.c,v 1.1.1.1.2.3 2000/10/10 21:12:43 he Exp $   */
 
 #if !defined(lint) && !defined(SABER)
 static const char rcsid[] = "Id: ns_ixfr.c,v 8.17 1999/11/05 04:48:28 vixie Exp";
@@ -384,7 +384,7 @@
 
        (void) strcat(tmpname, ".XXXXXX");
        if ((fd = mkstemp(tmpname)) == -1) {
-               ns_warning(ns_log_db, "can't make tmpfile (%s): %s", 
+               ns_warning(ns_log_db, "can't make tmpfile (%s): %s", tmpname,
                                strerror(errno));
                memput(tmpname, (strlen(zp->z_ixfr_base) + sizeof(".XXXXXX") + 1));
                return (-1);
@@ -419,8 +419,8 @@
        }
        (void) my_fclose(db_fp);
        ns_debug(ns_log_default, 3, "%s, size %d blk %d", 
-            zp->z_source, db_sb.st_size, 
-            db_sb.st_size);
+            zp->z_source, (int)db_sb.st_size, 
+            (int)db_sb.st_size);       /* XXX something is fishy here */
 
        /* open up the zone ixfr log */
     if ((from_fp = fopen(zp->z_ixfr_base, "r")) == NULL) {
@@ -445,7 +445,7 @@
        }
        ns_debug(ns_log_default, 3, "%s, size %d log_s %d max %d\n", 
             zp->z_ixfr_base, 
-            sb.st_size, 
+            (int)sb.st_size, 
             zp->z_log_size_ixfr, 
             zp->z_max_log_size_ixfr);
        if (zp->z_max_log_size_ixfr) {
@@ -558,7 +558,7 @@
 
        ns_debug(ns_log_default, 3, "%s, size %d log_s %d max %d\n", 
             zp->z_ixfr_base, 
-            sb.st_size, 
+            (int)sb.st_size, 
             zp->z_log_size_ixfr, 
             zp->z_max_log_size_ixfr);
        return (0);
diff -r 3a3dcf36dc02 -r c4b2a74947f0 dist/bind/bin/named/ns_lexer.c
--- a/dist/bind/bin/named/ns_lexer.c    Tue Oct 10 21:12:30 2000 +0000
+++ b/dist/bind/bin/named/ns_lexer.c    Tue Oct 10 21:12:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_lexer.c,v 1.1.1.1.2.2 1999/12/04 16:54:58 he Exp $  */
+/*     $NetBSD: ns_lexer.c,v 1.1.1.1.2.3 2000/10/10 21:12:46 he Exp $  */
 
 #if !defined(lint) && !defined(SABER)
 static const char rcsid[] = "Id: ns_lexer.c,v 8.19 1999/10/13 16:39:08 vixie Exp";
@@ -139,6 +139,11 @@
        return (buffer);
 }
 
+static void
+parser_complain(int is_warning, int print_last_token, const char *format,
+               va_list args)
+     __attribute__((__format__(__printf__, 3, 0)));
+
 static char where[MAXPATHLEN + 100];
 static char message[20480];
 
@@ -201,7 +206,7 @@
 
 void
 yyerror(const char *message) {
-       parser_error(1, message);
+       parser_error(1, "%s", message);
 }
 
 /*
diff -r 3a3dcf36dc02 -r c4b2a74947f0 dist/bind/bin/named/ns_lexer.h
--- a/dist/bind/bin/named/ns_lexer.h    Tue Oct 10 21:12:30 2000 +0000
+++ b/dist/bind/bin/named/ns_lexer.h    Tue Oct 10 21:12:35 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_lexer.h,v 1.1.1.1.2.2 1999/12/04 16:55:02 he Exp $  */
+/*     $NetBSD: ns_lexer.h,v 1.1.1.1.2.3 2000/10/10 21:12:49 he Exp $  */
 
 /*
  * Copyright (c) 1996-1999 by Internet Software Consortium.
@@ -32,8 +32,10 @@
 #define SYM_LOGGING    0x04
 #define SYM_SYSLOG     0x08
 
-int    parser_warning(int, const char *, ...);
-int    parser_error(int, const char *, ...);
+int    parser_warning(int, const char *, ...)
+     __attribute__((__format__(__printf__, 2, 3)));
+int    parser_error(int, const char *, ...)
+     __attribute__((__format__(__printf__, 2, 3)));
 void   yyerror(const char *);
 void   lexer_begin_file(const char *, FILE *);
 void   lexer_end_file(void);



Home | Main Index | Thread Index | Old Index