summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-27 10:44:07 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2002-06-27 10:44:07 +0000
commitecce4abaa936b16cec5967f215a8ba4105e1f557 (patch)
tree2e6df2128816f4327e018b83933f36620765aab7 /usr.sbin
parentad54170d450b158ab68109a9c33085a81ae0bebe (diff)
%d/%u mixup
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/named/libresolv/res_debug.c26
-rw-r--r--usr.sbin/named/libresolv/res_init.c6
-rw-r--r--usr.sbin/named/libresolv/res_query.c6
3 files changed, 19 insertions, 19 deletions
diff --git a/usr.sbin/named/libresolv/res_debug.c b/usr.sbin/named/libresolv/res_debug.c
index e09e12fb379..cd407cf1a5a 100644
--- a/usr.sbin/named/libresolv/res_debug.c
+++ b/usr.sbin/named/libresolv/res_debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_debug.c,v 1.2 1998/05/22 00:47:22 millert Exp $ */
+/* $OpenBSD: res_debug.c,v 1.3 2002/06/27 10:44:06 itojun Exp $ */
/*
* ++Copyright++ 1985, 1990, 1993
@@ -82,7 +82,7 @@
static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$From: res_debug.c,v 8.20 1997/06/01 20:34:37 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_debug.c,v 1.2 1998/05/22 00:47:22 millert Exp $";
+static char rcsid[] = "$OpenBSD: res_debug.c,v 1.3 2002/06/27 10:44:06 itojun Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -303,7 +303,7 @@ __fp_nquery(msg, len, file)
cp = msg + HFIXEDSZ;
endMark = msg + len;
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || hp->rcode) {
- fprintf(file, ";; ->>HEADER<<- opcode: %s, status: %s, id: %d",
+ fprintf(file, ";; ->>HEADER<<- opcode: %s, status: %s, id: %u",
_res_opcodes[hp->opcode],
_res_resultcodes[hp->rcode],
ntohs(hp->id));
@@ -331,10 +331,10 @@ __fp_nquery(msg, len, file)
fprintf(file, " cd");
}
if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD1)) {
- fprintf(file, "; Ques: %d", ntohs(hp->qdcount));
- fprintf(file, ", Ans: %d", ntohs(hp->ancount));
- fprintf(file, ", Auth: %d", ntohs(hp->nscount));
- fprintf(file, ", Addit: %d", ntohs(hp->arcount));
+ fprintf(file, "; Ques: %u", ntohs(hp->qdcount));
+ fprintf(file, ", Ans: %u", ntohs(hp->ancount));
+ fprintf(file, ", Auth: %u", ntohs(hp->nscount));
+ fprintf(file, ", Addit: %u", ntohs(hp->arcount));
}
if ((!_res.pfcode) || (_res.pfcode &
(RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) {
@@ -547,7 +547,7 @@ __p_rr(cp, msg, file)
cp += sizeof (u_char);
port = _getshort((u_char*)cp);
cp += INT16SZ;
- fprintf(file, "\t%s\t; proto %d, port %d",
+ fprintf(file, "\t%s\t; proto %u, port %u",
address, protocol, port);
}
break;
@@ -619,14 +619,14 @@ __p_rr(cp, msg, file)
case T_MX:
case T_AFSDB:
case T_RT:
- fprintf(file, "\t%d ", _getshort((u_char*)cp));
+ fprintf(file, "\t%u ", _getshort((u_char*)cp));
cp += INT16SZ;
if ((cp = p_fqname(cp, msg, file)) == NULL)
return (NULL);
break;
case T_PX:
- fprintf(file, "\t%d ", _getshort((u_char*)cp));
+ fprintf(file, "\t%u ", _getshort((u_char*)cp));
cp += INT16SZ;
if ((cp = p_fqname(cp, msg, file)) == NULL)
return (NULL);
@@ -802,7 +802,7 @@ __p_rr(cp, msg, file)
type = _getshort((u_char*)cp);
cp += INT16SZ;
fprintf(file, " %s", p_type(type));
- fprintf(file, "\t%d", *cp++); /* algorithm */
+ fprintf(file, "\t%u", *cp++); /* algorithm */
/* Check label value and print error if wrong. */
n = *cp++;
c = dn_count_labels (rrname);
@@ -868,8 +868,8 @@ __p_rr(cp, msg, file)
putc('\n', file);
#endif
if (cp - cp1 != dlen) {
- fprintf(file, ";; packet size error (found %d, dlen was %d)\n",
- cp - cp1, dlen);
+ fprintf(file, ";; packet size error (found %ld, dlen was %d)\n",
+ (long)(cp - cp1), dlen);
cp = NULL;
}
return (cp);
diff --git a/usr.sbin/named/libresolv/res_init.c b/usr.sbin/named/libresolv/res_init.c
index da938536c3f..4fa4cb36c45 100644
--- a/usr.sbin/named/libresolv/res_init.c
+++ b/usr.sbin/named/libresolv/res_init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_init.c,v 1.6 2002/02/16 21:28:05 millert Exp $ */
+/* $OpenBSD: res_init.c,v 1.7 2002/06/27 10:44:06 itojun Exp $ */
/*
* ++Copyright++ 1985, 1989, 1993
@@ -60,7 +60,7 @@
static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
static char rcsid[] = "$From: res_init.c,v 8.8 1997/06/01 20:34:37 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_init.c,v 1.6 2002/02/16 21:28:05 millert Exp $";
+static char rcsid[] = "$OpenBSD: res_init.c,v 1.7 2002/06/27 10:44:06 itojun Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -463,7 +463,7 @@ res_setoptions(options, source)
_res.ndots = RES_MAXNDOTS;
#ifdef DEBUG
if (_res.options & RES_DEBUG)
- printf(";;\tndots=%d\n", _res.ndots);
+ printf(";;\tndots=%u\n", _res.ndots);
#endif
} else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
#ifdef DEBUG
diff --git a/usr.sbin/named/libresolv/res_query.c b/usr.sbin/named/libresolv/res_query.c
index 836cc745c71..219ec544af1 100644
--- a/usr.sbin/named/libresolv/res_query.c
+++ b/usr.sbin/named/libresolv/res_query.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_query.c,v 1.4 2002/02/16 21:28:05 millert Exp $ */
+/* $OpenBSD: res_query.c,v 1.5 2002/06/27 10:44:06 itojun Exp $ */
/*
* ++Copyright++ 1988, 1993
@@ -60,7 +60,7 @@
static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$From: res_query.c,v 8.10 1997/06/01 20:34:37 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_query.c,v 1.4 2002/02/16 21:28:05 millert Exp $";
+static char rcsid[] = "$OpenBSD: res_query.c,v 1.5 2002/06/27 10:44:06 itojun Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -150,7 +150,7 @@ res_query(name, class, type, answer, anslen)
if (hp->rcode != NOERROR || ntohs(hp->ancount) == 0) {
#ifdef DEBUG
if (_res.options & RES_DEBUG)
- printf(";; rcode = %d, ancount=%d\n", hp->rcode,
+ printf(";; rcode = %u, ancount=%u\n", hp->rcode,
ntohs(hp->ancount));
#endif
switch (hp->rcode) {