summaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/inet_ntoa.c4
-rw-r--r--lib/libc/net/res_debug.c22
-rw-r--r--lib/libc/net/res_init.c8
-rw-r--r--lib/libc/net/res_random.c12
-rw-r--r--lib/libc/net/rthdr.c22
5 files changed, 34 insertions, 34 deletions
diff --git a/lib/libc/net/inet_ntoa.c b/lib/libc/net/inet_ntoa.c
index 148732ba5a4..377184f3668 100644
--- a/lib/libc/net/inet_ntoa.c
+++ b/lib/libc/net/inet_ntoa.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.2 1996/08/19 08:29:16 tholo Exp $";
+static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.3 2002/06/27 10:14:01 itojun Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -54,6 +54,6 @@ inet_ntoa(in)
p = (char *)∈
#define UC(b) (((int)b)&0xff)
(void)snprintf(b, sizeof(b),
- "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
+ "%u.%u.%u.%u", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
return (b);
}
diff --git a/lib/libc/net/res_debug.c b/lib/libc/net/res_debug.c
index 75d70e86b6f..a1c88e24b39 100644
--- a/lib/libc/net/res_debug.c
+++ b/lib/libc/net/res_debug.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_debug.c,v 1.12 2002/05/24 21:22:37 deraadt Exp $ */
+/* $OpenBSD: res_debug.c,v 1.13 2002/06/27 10:14:02 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.19 1996/11/26 10:11:23 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_debug.c,v 1.12 2002/05/24 21:22:37 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: res_debug.c,v 1.13 2002/06/27 10:14:02 itojun Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -286,7 +286,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));
@@ -314,10 +314,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))) {
@@ -531,7 +531,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;
@@ -603,14 +603,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);
@@ -786,7 +786,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);
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c
index 121606ac489..099aa04e306 100644
--- a/lib/libc/net/res_init.c
+++ b/lib/libc/net/res_init.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_init.c,v 1.25 2002/02/16 21:27:23 millert Exp $ */
+/* $OpenBSD: res_init.c,v 1.26 2002/06/27 10:14:02 itojun Exp $ */
/*
* ++Copyright++ 1985, 1989, 1993
@@ -64,7 +64,7 @@
static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_init.c,v 1.25 2002/02/16 21:27:23 millert Exp $";
+static char rcsid[] = "$OpenBSD: res_init.c,v 1.26 2002/06/27 10:14:02 itojun Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -371,7 +371,7 @@ res_init()
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_NUMERICHOST;
hints.ai_socktype = SOCK_DGRAM;
- snprintf(pbuf, sizeof(pbuf), "%d", NAMESERVER_PORT);
+ snprintf(pbuf, sizeof(pbuf), "%u", NAMESERVER_PORT);
res = NULL;
if (getaddrinfo(cp, pbuf, &hints, &res) == 0 &&
res->ai_next == NULL) {
@@ -593,7 +593,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)) {
diff --git a/lib/libc/net/res_random.c b/lib/libc/net/res_random.c
index 7a7d0bd6777..c739e4a9521 100644
--- a/lib/libc/net/res_random.c
+++ b/lib/libc/net/res_random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_random.c,v 1.11 2002/02/19 19:39:36 millert Exp $ */
+/* $OpenBSD: res_random.c,v 1.12 2002/06/27 10:14:02 itojun Exp $ */
/*
* Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -212,12 +212,12 @@ main(int argc, char **argv)
res_initid();
- printf("Generator: %d\n", ru_g);
- printf("Seed: %d\n", ru_seed);
+ printf("Generator: %u\n", ru_g);
+ printf("Seed: %u\n", ru_seed);
printf("Reseed at %ld\n", ru_reseed);
- printf("Ru_X: %d\n", ru_x);
- printf("Ru_A: %d\n", ru_a);
- printf("Ru_B: %d\n", ru_b);
+ printf("Ru_X: %u\n", ru_x);
+ printf("Ru_A: %u\n", ru_a);
+ printf("Ru_B: %u\n", ru_b);
n = atoi(argv[1]);
for (i=0;i<n;i++) {
diff --git a/lib/libc/net/rthdr.c b/lib/libc/net/rthdr.c
index 5cd485889bd..7a87b322d10 100644
--- a/lib/libc/net/rthdr.c
+++ b/lib/libc/net/rthdr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthdr.c,v 1.2 2000/02/29 18:25:52 itojun Exp $ */
+/* $OpenBSD: rthdr.c,v 1.3 2002/06/27 10:14:02 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -100,7 +100,7 @@ inet6_rthdr_add(cmsg, addr, flags)
struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr;
if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) {
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_add: unsupported flag(%d)\n", flags);
+ fprintf(stderr, "inet6_rthdr_add: unsupported flag(%u)\n", flags);
#endif
return(-1);
}
@@ -125,7 +125,7 @@ inet6_rthdr_add(cmsg, addr, flags)
}
default:
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_add: unknown type(%d)\n",
+ fprintf(stderr, "inet6_rthdr_add: unknown type(%u)\n",
rthdr->ip6r_type);
#endif
return(-1);
@@ -149,7 +149,7 @@ inet6_rthdr_lasthop(cmsg, flags)
struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr;
if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) {
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_lasthop: unsupported flag(%d)\n", flags);
+ fprintf(stderr, "inet6_rthdr_lasthop: unsupported flag(%u)\n", flags);
#endif
return(-1);
}
@@ -169,7 +169,7 @@ inet6_rthdr_lasthop(cmsg, flags)
}
default:
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_lasthop: unknown type(%d)\n",
+ fprintf(stderr, "inet6_rthdr_lasthop: unknown type(%u)\n",
rthdr->ip6r_type);
#endif
return(-1);
@@ -206,7 +206,7 @@ inet6_rthdr_segments(cmsg)
if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) {
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_segments: invalid size(%d)\n",
+ fprintf(stderr, "inet6_rthdr_segments: invalid size(%u)\n",
rt0->ip6r0_len);
#endif
return -1;
@@ -217,7 +217,7 @@ inet6_rthdr_segments(cmsg)
default:
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_segments: unknown type(%d)\n",
+ fprintf(stderr, "inet6_rthdr_segments: unknown type(%u)\n",
rthdr->ip6r_type);
#endif
return -1;
@@ -241,7 +241,7 @@ inet6_rthdr_getaddr(cmsg, index)
if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) {
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getaddr: invalid size(%d)\n",
+ fprintf(stderr, "inet6_rthdr_getaddr: invalid size(%u)\n",
rt0->ip6r0_len);
#endif
return NULL;
@@ -258,7 +258,7 @@ inet6_rthdr_getaddr(cmsg, index)
default:
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getaddr: unknown type(%d)\n",
+ fprintf(stderr, "inet6_rthdr_getaddr: unknown type(%u)\n",
rthdr->ip6r_type);
#endif
return NULL;
@@ -282,7 +282,7 @@ inet6_rthdr_getflags(cmsg, index)
if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) {
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getflags: invalid size(%d)\n",
+ fprintf(stderr, "inet6_rthdr_getflags: invalid size(%u)\n",
rt0->ip6r0_len);
#endif
return -1;
@@ -302,7 +302,7 @@ inet6_rthdr_getflags(cmsg, index)
default:
#ifdef DEBUG
- fprintf(stderr, "inet6_rthdr_getflags: unknown type(%d)\n",
+ fprintf(stderr, "inet6_rthdr_getflags: unknown type(%u)\n",
rthdr->ip6r_type);
#endif
return -1;