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 Pull up revision 1.2 (requested by is):



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

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

diffstat:

 dist/bind/bin/named-xfer/named-xfer.c  |   4 ++--
 dist/bind/bin/named/ns_maint.c         |  16 ++++++++--------
 dist/bind/bin/named/ns_parser.y        |   6 ++++--
 dist/bind/bin/named/ns_resp.c          |  18 +++++++++---------
 dist/bind/bin/named/ns_stats.c         |  10 +++++-----
 dist/bind/bin/named/ns_update.c        |  21 ++++++++++-----------
 dist/bind/bin/ndc/ndc.c                |  25 +++++++++++++++++--------
 dist/bind/include/isc/ctl.h            |   5 +++--
 dist/bind/include/isc/logging.h        |   8 +++++---
 dist/bind/lib/dst/dst_api.c            |   5 ++---
 dist/bind/lib/dst/dst_internal.h       |   4 ++--
 dist/bind/lib/irs/irp_p.h              |   5 +++--
 dist/bind/lib/isc/ev_files.c           |   4 ++--
 dist/bind/lib/isc/ev_timers.c          |  12 ++++++------
 dist/bind/lib/isc/ev_waits.c           |   8 ++++----
 dist/bind/lib/isc/eventlib.c           |  14 +++++++-------
 dist/bind/lib/isc/eventlib_p.h         |   5 +++--
 dist/bind/lib/resolv/res_findzonecut.c |   9 +++++----
 dist/bind/lib/resolv/res_send.c        |   4 ++--
 dist/bind/lib/resolv/res_update.c      |   5 +++--
 20 files changed, 102 insertions(+), 86 deletions(-)

diffs (truncated from 688 to 300 lines):

diff -r 88b59ce140ef -r 8ff91f01b678 dist/bind/bin/named-xfer/named-xfer.c
--- a/dist/bind/bin/named-xfer/named-xfer.c     Tue Oct 10 21:12:52 2000 +0000
+++ b/dist/bind/bin/named-xfer/named-xfer.c     Tue Oct 10 21:12:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: named-xfer.c,v 1.1.1.1.2.2 1999/12/04 16:57:02 he Exp $        */
+/*     $NetBSD: named-xfer.c,v 1.1.1.1.2.3 2000/10/10 21:18:50 he Exp $        */
 
 /*
  * The original version of named-xfer by Kevin Dunlap.
@@ -1767,7 +1767,7 @@
        iov[1].iov_len = msglen;
        ret = writev(rfd, iov, 2);
        if (ret != INT16SZ + msglen) {
-               syslog(LOG_DEBUG, "writemsg(%d,%#x,%d) failed: %s",
+               syslog(LOG_DEBUG, "writemsg(%d,%p,%d) failed: %s",
                       rfd, msg, msglen, strerror(errno));
                return (-1);
        }
diff -r 88b59ce140ef -r 8ff91f01b678 dist/bind/bin/named/ns_maint.c
--- a/dist/bind/bin/named/ns_maint.c    Tue Oct 10 21:12:52 2000 +0000
+++ b/dist/bind/bin/named/ns_maint.c    Tue Oct 10 21:12:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_maint.c,v 1.1.1.1.2.2 1999/12/04 16:55:14 he Exp $  */
+/*     $NetBSD: ns_maint.c,v 1.1.1.1.2.3 2000/10/10 21:12:56 he Exp $  */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)ns_maint.c   4.39 (Berkeley) 3/2/91";
@@ -553,7 +553,7 @@
                qs = &qp->q_addr[n];
                ns_debug(ns_log_default, 1, "qserial_answer(%s): [%s] -> %lu",
                         zp->z_origin, inet_ntoa(qs->ns_addr.sin_addr),
-                        qs->serial);
+                        (unsigned long)qs->serial);
                /* Don't consider serials which weren't set by a response. */
                if (qs->serial == 0)
                        continue;
@@ -568,9 +568,9 @@
                                ns_notice(ns_log_xfer_in,
  "Zone \"%s\" (%s) SOA serial# (%lu) rcvd from [%s] is < ours (%lu)%s",
                                          zp->z_origin, p_class(zp->z_class),
-                                         qs->serial,
+                                         (unsigned long)qs->serial,
                                          inet_ntoa(qs->ns_addr.sin_addr),
-                                         zp->z_serial, qp->q_naddr != 1 ?
+                                         (unsigned long)zp->z_serial, qp->q_naddr != 1 ?
                                                        ": skipping" : "");
                        qs->serial = 0;
                        continue;
@@ -588,7 +588,7 @@
                        ns_debug(ns_log_default, 1,
                                 "qserial_answer after sort: [%s] -> %lu",
                                 inet_ntoa(qs->ns_addr.sin_addr),
-                                qs->serial);
+                                (unsigned long)qs->serial);
                }
        }
 
@@ -797,7 +797,7 @@
                        curr++;
                }
                *curr = '\0';
-               ns_debug(ns_log_xfer_in, 1, buffer);
+               ns_debug(ns_log_xfer_in, 1, "%s", buffer);
         }
 #endif /* DEBUG */
 
@@ -882,8 +882,8 @@
        if (zp->z_type == z_master && (zp->z_flags & Z_DYNAMIC) != 0) {
                ns_debug(category, level,
                         "\tdumpintvl %lu, soaincrintvl %lu deferupdcnt %lu",
-                        zp->z_dumpintvl, zp->z_soaincrintvl,
-                        zp->z_deferupdcnt);
+                        (unsigned long)zp->z_dumpintvl, zp->z_soaincrintvl,
+                        (unsigned long)zp->z_deferupdcnt);
                if (zp->z_soaincrtime)
                        ns_debug(category, level,
                                 "\tz_soaincrtime %lu (now %lu, left: %lu)",
diff -r 88b59ce140ef -r 8ff91f01b678 dist/bind/bin/named/ns_parser.y
--- a/dist/bind/bin/named/ns_parser.y   Tue Oct 10 21:12:52 2000 +0000
+++ b/dist/bind/bin/named/ns_parser.y   Tue Oct 10 21:12:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_parser.y,v 1.1.1.1.2.2 1999/12/04 16:55:32 he Exp $ */
+/*     $NetBSD: ns_parser.y,v 1.1.1.1.2.3 2000/10/10 21:13:00 he Exp $ */
 
 %{
 #if !defined(lint) && !defined(SABER)
@@ -98,6 +98,8 @@
 static void define_channel(char *, log_channel);
 static char *canonical_name(char *);
 
+extern const char *p_order(int order);
+
 int yyparse();
        
 %}
@@ -1763,7 +1765,7 @@
                if ($1 < 0 || $1 > 65535) {
                        parser_warning(0, 
                          "invalid IP port number '%d'; setting port to 0",
-                                      $1);
+                                      (int)$1);
                        $1 = 0;
                } else
                        $$ = htons($1);
diff -r 88b59ce140ef -r 8ff91f01b678 dist/bind/bin/named/ns_resp.c
--- a/dist/bind/bin/named/ns_resp.c     Tue Oct 10 21:12:52 2000 +0000
+++ b/dist/bind/bin/named/ns_resp.c     Tue Oct 10 21:12:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_resp.c,v 1.1.1.1.2.2 1999/12/04 16:55:52 he Exp $   */
+/*     $NetBSD: ns_resp.c,v 1.1.1.1.2.3 2000/10/10 21:13:03 he Exp $   */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)ns_resp.c    4.65 (Berkeley) 3/3/91";
@@ -1958,8 +1958,8 @@
                /* Don't let bogus name servers increase the signed TTL */
                if (ttl > origTTL) {
                        ns_debug(ns_log_default, 3,
-                                "shrinking SIG TTL from %d to origTTL %d",
-                                ttl, origTTL);
+                                "shrinking SIG TTL from %ld to origTTL %ld",
+                                (long)ttl, (long)origTTL);
                        ttl = origTTL;
                }
 
@@ -1983,7 +1983,7 @@
                timetilexp = exptime - now;
                if (timetilexp < ttl) {
                        ns_debug(ns_log_default, 3,
-                                "shrinking expiring %s SIG TTL from %d to %d",
+                                "shrinking expiring %s SIG TTL from %d to %ld",
                                 p_secstodate (exptime), ttl, timetilexp);
                        ttl = timetilexp;
                }
@@ -2279,7 +2279,7 @@
        DST_KEY *key;
 
        nsp[0] = NULL;
-       ns_debug(ns_log_default, 3, "sysquery(%s, %d, %d, %#x, %d, %d)",
+       ns_debug(ns_log_default, 3, "sysquery(%s, %d, %d, %p, %d, %d)",
                 dname, class, type, nss, nsc, ntohs(port));
        qp = qnew(dname, class, type);
 
@@ -2694,7 +2694,7 @@
                                break;
        }
        while (np != NULL) {
-               ns_debug(ns_log_default, 5, "findns: np %#x '%s'", np,
+               ns_debug(ns_log_default, 5, "findns: np %p '%s'", np,
                         NAME(*np));
                /* Look first for SOA records. */
 #ifdef ADDAUTH
@@ -3199,7 +3199,7 @@
 #ifdef DEBUG
        strcpy(pclass, p_class(class));
        strcpy(ptype, p_type(type));
-       ns_debug(ns_log_default, 3, "wanted(%#x, %s %s) [%s %s]",
+       ns_debug(ns_log_default, 3, "wanted(%p, %s %s) [%s %s]",
                 dp, pclass, ptype,
                 p_class(dp->d_class), p_type(dp->d_type));
 #endif
@@ -3279,7 +3279,7 @@
 #ifdef DEBUG
        strcpy(pclass, p_class(class));
        strcpy(ptype, p_type(type));
-       ns_debug(ns_log_default, 3, "wantedtsig(%#x, %s %s) [%s %s]",
+       ns_debug(ns_log_default, 3, "wantedtsig(%p, %s %s) [%s %s]",
                 dp, pclass, ptype,
                 p_class(dp->d_class), p_type(dp->d_type));
 #endif
@@ -3694,7 +3694,7 @@
 delete_all(struct namebuf *np, int class, int type) {
        struct databuf *dp, *pdp;
 
-       ns_debug(ns_log_default, 3, "delete_all(%#x:\"%s\" %s %s)",
+       ns_debug(ns_log_default, 3, "delete_all(%p:\"%s\" %s %s)",
                 np, NAME(*np), p_class(class), p_type(type));
        pdp = NULL;
        dp = np->n_data;
diff -r 88b59ce140ef -r 8ff91f01b678 dist/bind/bin/named/ns_stats.c
--- a/dist/bind/bin/named/ns_stats.c    Tue Oct 10 21:12:52 2000 +0000
+++ b/dist/bind/bin/named/ns_stats.c    Tue Oct 10 21:12:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_stats.c,v 1.1.1.1.2.2 1999/12/04 16:56:07 he Exp $  */
+/*     $NetBSD: ns_stats.c,v 1.1.1.1.2.3 2000/10/10 21:13:12 he Exp $  */
 
 #if !defined(lint) && !defined(SABER)
 static const char sccsid[] = "@(#)ns_stats.c   4.10 (Berkeley) 6/27/90";
@@ -360,13 +360,13 @@
                        sprintf(buffer2, " %s=%lu", p_type(i), typestats[i]);
                        if (strlen(buffer) + strlen(buffer2) >
                            sizeof(buffer) - 1) {
-                               ns_info(ns_log_statistics, buffer);
+                               ns_info(ns_log_statistics, "%s", buffer);
                                strcpy(buffer, header);
                        }
                        strcat(buffer, buffer2);
                }
        }
-       ns_info(ns_log_statistics, buffer);
+       ns_info(ns_log_statistics, "%s", buffer);
 
        sprintf(header, "XSTATS %lu %lu", (u_long)timenow, (u_long)boottime);
        strcpy(buffer, header);
@@ -374,12 +374,12 @@
                sprintf(buffer2, " %s=%lu",
                        statNames[i]?statNames[i]:"?", (u_long)globalStats[i]);
                if (strlen(buffer) + strlen(buffer2) > sizeof(buffer) - 1) {
-                       ns_info(ns_log_statistics, buffer);
+                       ns_info(ns_log_statistics, "%s",buffer);
                        strcpy(buffer, header);
                }
                strcat(buffer, buffer2);
        }
-       ns_info(ns_log_statistics, buffer);
+       ns_info(ns_log_statistics, "%s", buffer);
 }
 
 static void
diff -r 88b59ce140ef -r 8ff91f01b678 dist/bind/bin/named/ns_update.c
--- a/dist/bind/bin/named/ns_update.c   Tue Oct 10 21:12:52 2000 +0000
+++ b/dist/bind/bin/named/ns_update.c   Tue Oct 10 21:12:56 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ns_update.c,v 1.1.1.1.2.2 1999/12/04 16:56:16 he Exp $ */
+/*     $NetBSD: ns_update.c,v 1.1.1.1.2.3 2000/10/10 21:13:16 he Exp $ */
 
 #if !defined(lint) && !defined(SABER)
 static const char rcsid[] = "Id: ns_update.c,v 8.68 1999/11/05 04:40:58 vixie Exp";
@@ -958,7 +958,7 @@
 
                ns_debug(ns_log_update, 3,
 "process_update: record section=%s, dname=%s, \
-class=%s, type=%s, ttl=%d, dp=0x%0x",
+class=%s, type=%s, ttl=%d, dp=%p",
                         p_section(section, ns_o_update), dname,
                         p_class(class), p_type(type), ttl, rdp);
 
@@ -1029,8 +1029,7 @@
                                         n);
                        } else {
                                ns_debug(ns_log_update, 3,
-                                     "process_updates: added databuf 0x%0x",
-                                        dp);
+                                     "process_updates: added databuf %p", dp);
                                dp->d_mark = D_MARK_ADDED;
                                numupdated++;
                                if (dp->d_type == T_SOA)
@@ -1371,7 +1370,7 @@
                first_rrecp = TAIL(*updlist);
                msg = "free_rrecp: update transaction aborted, rolling back";
        }
-       ns_debug(ns_log_update, 1, msg);
+       ns_debug(ns_log_update, 1, "%s", msg);
        for (rrecp = first_rrecp; rrecp != NULL; rrecp = next_rrecp) {
                if (rcode == NOERROR)
                        next_rrecp = NEXT(rrecp, r_link);
@@ -1403,7 +1402,7 @@
                                                 dname, p_type(dp->d_type));
                                } else {
                                        ns_debug(ns_log_update, 3,
-                                        "free_rrecp: deleted databuf 0x%0x",
+                                        "free_rrecp: deleted databuf %p",
                                                 dp);
                                        /* 
                                         * XXXRTH 
@@ -1434,7 +1433,7 @@
                        if (rcode == NOERROR) {
                                if (tmpdp->d_rcnt)
                                        ns_debug(ns_log_update, 1,
-                                          "free_rrecp: type = %d, rcnt = %d",
+                                          "free_rrecp: type = %s, rcnt = %d",
                                                 p_type(tmpdp->d_type),
                                                 tmpdp->d_rcnt);
                                else {
@@ -1451,7 +1450,7 @@
                                                 dname, p_type(tmpdp->d_type));
                                } else {
                                        ns_debug(ns_log_update, 3,
-                                     "free_rrecp: added back databuf 0x%0x",
+                                     "free_rrecp: added back databuf %p",
                                                 tmpdp);
                                }
                        }
@@ -1771,7 +1770,7 @@
                        if ((n = *cp++) != '\0') {
                                for (j = n; j > 0 && cp < end; j--)
                                        if ((*cp < ' ') || (*cp > '~')) {
-                                               fprintf(fp, "\\%03.3d", *cp++);
+                                               fprintf(fp, "\\%3.3d", *cp++);
                                        } else if (*cp == '\\' || *cp =='"') {
                                                putc('\\', fp);
                                                putc(*cp++, fp);
@@ -1920,7 +1919,7 @@
        int escaped, found, done;
 
        ns_debug(ns_log_update, 4, "findzone(dname=%s, class=%d, depth=%d, \
-zonelist=0x%x, maxzones=%d)",
+zonelist=%p, maxzones=%d)",
                 dname, class, depth, zonelist, maxzones);
 #ifdef DEBUG
        if (debug >= 5) {



Home | Main Index | Thread Index | Old Index