diff options
Diffstat (limited to 'src/lib/libc')
| -rw-r--r-- | src/lib/libc/net/inet_ntoa.c | 4 | ||||
| -rw-r--r-- | src/lib/libc/net/res_debug.c | 22 | ||||
| -rw-r--r-- | src/lib/libc/net/res_init.c | 8 | ||||
| -rw-r--r-- | src/lib/libc/net/res_random.c | 12 | ||||
| -rw-r--r-- | src/lib/libc/net/rthdr.c | 22 | 
5 files changed, 34 insertions, 34 deletions
| diff --git a/src/lib/libc/net/inet_ntoa.c b/src/lib/libc/net/inet_ntoa.c index 148732ba5a..377184f366 100644 --- a/src/lib/libc/net/inet_ntoa.c +++ b/src/lib/libc/net/inet_ntoa.c | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | */ | 32 | */ | 
| 33 | 33 | ||
| 34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) | 
| 35 | static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.2 1996/08/19 08:29:16 tholo Exp $"; | 35 | static char rcsid[] = "$OpenBSD: inet_ntoa.c,v 1.3 2002/06/27 10:14:01 itojun Exp $"; | 
| 36 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ | 
| 37 | 37 | ||
| 38 | /* | 38 | /* | 
| @@ -54,6 +54,6 @@ inet_ntoa(in) | |||
| 54 | p = (char *)∈ | 54 | p = (char *)∈ | 
| 55 | #define UC(b) (((int)b)&0xff) | 55 | #define UC(b) (((int)b)&0xff) | 
| 56 | (void)snprintf(b, sizeof(b), | 56 | (void)snprintf(b, sizeof(b), | 
| 57 | "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3])); | 57 | "%u.%u.%u.%u", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3])); | 
| 58 | return (b); | 58 | return (b); | 
| 59 | } | 59 | } | 
| diff --git a/src/lib/libc/net/res_debug.c b/src/lib/libc/net/res_debug.c index 75d70e86b6..a1c88e24b3 100644 --- a/src/lib/libc/net/res_debug.c +++ b/src/lib/libc/net/res_debug.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: res_debug.c,v 1.12 2002/05/24 21:22:37 deraadt Exp $ */ | 1 | /* $OpenBSD: res_debug.c,v 1.13 2002/06/27 10:14:02 itojun Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * ++Copyright++ 1985, 1990, 1993 | 4 | * ++Copyright++ 1985, 1990, 1993 | 
| @@ -82,7 +82,7 @@ | |||
| 82 | static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; | 82 | static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93"; | 
| 83 | static char rcsid[] = "$From: res_debug.c,v 8.19 1996/11/26 10:11:23 vixie Exp $"; | 83 | static char rcsid[] = "$From: res_debug.c,v 8.19 1996/11/26 10:11:23 vixie Exp $"; | 
| 84 | #else | 84 | #else | 
| 85 | static char rcsid[] = "$OpenBSD: res_debug.c,v 1.12 2002/05/24 21:22:37 deraadt Exp $"; | 85 | static char rcsid[] = "$OpenBSD: res_debug.c,v 1.13 2002/06/27 10:14:02 itojun Exp $"; | 
| 86 | #endif | 86 | #endif | 
| 87 | #endif /* LIBC_SCCS and not lint */ | 87 | #endif /* LIBC_SCCS and not lint */ | 
| 88 | 88 | ||
| @@ -286,7 +286,7 @@ __fp_nquery(msg, len, file) | |||
| 286 | cp = msg + HFIXEDSZ; | 286 | cp = msg + HFIXEDSZ; | 
| 287 | endMark = msg + len; | 287 | endMark = msg + len; | 
| 288 | if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || hp->rcode) { | 288 | if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEADX) || hp->rcode) { | 
| 289 | fprintf(file, ";; ->>HEADER<<- opcode: %s, status: %s, id: %d", | 289 | fprintf(file, ";; ->>HEADER<<- opcode: %s, status: %s, id: %u", | 
| 290 | _res_opcodes[hp->opcode], | 290 | _res_opcodes[hp->opcode], | 
| 291 | _res_resultcodes[hp->rcode], | 291 | _res_resultcodes[hp->rcode], | 
| 292 | ntohs(hp->id)); | 292 | ntohs(hp->id)); | 
| @@ -314,10 +314,10 @@ __fp_nquery(msg, len, file) | |||
| 314 | fprintf(file, " cd"); | 314 | fprintf(file, " cd"); | 
| 315 | } | 315 | } | 
| 316 | if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD1)) { | 316 | if ((!_res.pfcode) || (_res.pfcode & RES_PRF_HEAD1)) { | 
| 317 | fprintf(file, "; Ques: %d", ntohs(hp->qdcount)); | 317 | fprintf(file, "; Ques: %u", ntohs(hp->qdcount)); | 
| 318 | fprintf(file, ", Ans: %d", ntohs(hp->ancount)); | 318 | fprintf(file, ", Ans: %u", ntohs(hp->ancount)); | 
| 319 | fprintf(file, ", Auth: %d", ntohs(hp->nscount)); | 319 | fprintf(file, ", Auth: %u", ntohs(hp->nscount)); | 
| 320 | fprintf(file, ", Addit: %d", ntohs(hp->arcount)); | 320 | fprintf(file, ", Addit: %u", ntohs(hp->arcount)); | 
| 321 | } | 321 | } | 
| 322 | if ((!_res.pfcode) || (_res.pfcode & | 322 | if ((!_res.pfcode) || (_res.pfcode & | 
| 323 | (RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) { | 323 | (RES_PRF_HEADX | RES_PRF_HEAD2 | RES_PRF_HEAD1))) { | 
| @@ -531,7 +531,7 @@ __p_rr(cp, msg, file) | |||
| 531 | cp += sizeof (u_char); | 531 | cp += sizeof (u_char); | 
| 532 | port = _getshort((u_char*)cp); | 532 | port = _getshort((u_char*)cp); | 
| 533 | cp += INT16SZ; | 533 | cp += INT16SZ; | 
| 534 | fprintf(file, "\t%s\t; proto %d, port %d", | 534 | fprintf(file, "\t%s\t; proto %u, port %u", | 
| 535 | address, protocol, port); | 535 | address, protocol, port); | 
| 536 | } | 536 | } | 
| 537 | break; | 537 | break; | 
| @@ -603,14 +603,14 @@ __p_rr(cp, msg, file) | |||
| 603 | case T_MX: | 603 | case T_MX: | 
| 604 | case T_AFSDB: | 604 | case T_AFSDB: | 
| 605 | case T_RT: | 605 | case T_RT: | 
| 606 | fprintf(file, "\t%d ", _getshort((u_char*)cp)); | 606 | fprintf(file, "\t%u ", _getshort((u_char*)cp)); | 
| 607 | cp += INT16SZ; | 607 | cp += INT16SZ; | 
| 608 | if ((cp = p_fqname(cp, msg, file)) == NULL) | 608 | if ((cp = p_fqname(cp, msg, file)) == NULL) | 
| 609 | return (NULL); | 609 | return (NULL); | 
| 610 | break; | 610 | break; | 
| 611 | 611 | ||
| 612 | case T_PX: | 612 | case T_PX: | 
| 613 | fprintf(file, "\t%d ", _getshort((u_char*)cp)); | 613 | fprintf(file, "\t%u ", _getshort((u_char*)cp)); | 
| 614 | cp += INT16SZ; | 614 | cp += INT16SZ; | 
| 615 | if ((cp = p_fqname(cp, msg, file)) == NULL) | 615 | if ((cp = p_fqname(cp, msg, file)) == NULL) | 
| 616 | return (NULL); | 616 | return (NULL); | 
| @@ -786,7 +786,7 @@ __p_rr(cp, msg, file) | |||
| 786 | type = _getshort((u_char*)cp); | 786 | type = _getshort((u_char*)cp); | 
| 787 | cp += INT16SZ; | 787 | cp += INT16SZ; | 
| 788 | fprintf(file, " %s", p_type(type)); | 788 | fprintf(file, " %s", p_type(type)); | 
| 789 | fprintf(file, "\t%d", *cp++); /* algorithm */ | 789 | fprintf(file, "\t%u", *cp++); /* algorithm */ | 
| 790 | /* Check label value and print error if wrong. */ | 790 | /* Check label value and print error if wrong. */ | 
| 791 | n = *cp++; | 791 | n = *cp++; | 
| 792 | c = dn_count_labels (rrname); | 792 | c = dn_count_labels (rrname); | 
| diff --git a/src/lib/libc/net/res_init.c b/src/lib/libc/net/res_init.c index 121606ac48..099aa04e30 100644 --- a/src/lib/libc/net/res_init.c +++ b/src/lib/libc/net/res_init.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: res_init.c,v 1.25 2002/02/16 21:27:23 millert Exp $ */ | 1 | /* $OpenBSD: res_init.c,v 1.26 2002/06/27 10:14:02 itojun Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * ++Copyright++ 1985, 1989, 1993 | 4 | * ++Copyright++ 1985, 1989, 1993 | 
| @@ -64,7 +64,7 @@ | |||
| 64 | static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; | 64 | static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; | 
| 65 | static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; | 65 | static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; | 
| 66 | #else | 66 | #else | 
| 67 | static char rcsid[] = "$OpenBSD: res_init.c,v 1.25 2002/02/16 21:27:23 millert Exp $"; | 67 | static char rcsid[] = "$OpenBSD: res_init.c,v 1.26 2002/06/27 10:14:02 itojun Exp $"; | 
| 68 | #endif | 68 | #endif | 
| 69 | #endif /* LIBC_SCCS and not lint */ | 69 | #endif /* LIBC_SCCS and not lint */ | 
| 70 | 70 | ||
| @@ -371,7 +371,7 @@ res_init() | |||
| 371 | memset(&hints, 0, sizeof(hints)); | 371 | memset(&hints, 0, sizeof(hints)); | 
| 372 | hints.ai_flags = AI_NUMERICHOST; | 372 | hints.ai_flags = AI_NUMERICHOST; | 
| 373 | hints.ai_socktype = SOCK_DGRAM; | 373 | hints.ai_socktype = SOCK_DGRAM; | 
| 374 | snprintf(pbuf, sizeof(pbuf), "%d", NAMESERVER_PORT); | 374 | snprintf(pbuf, sizeof(pbuf), "%u", NAMESERVER_PORT); | 
| 375 | res = NULL; | 375 | res = NULL; | 
| 376 | if (getaddrinfo(cp, pbuf, &hints, &res) == 0 && | 376 | if (getaddrinfo(cp, pbuf, &hints, &res) == 0 && | 
| 377 | res->ai_next == NULL) { | 377 | res->ai_next == NULL) { | 
| @@ -593,7 +593,7 @@ res_setoptions(options, source) | |||
| 593 | _res.ndots = RES_MAXNDOTS; | 593 | _res.ndots = RES_MAXNDOTS; | 
| 594 | #ifdef DEBUG | 594 | #ifdef DEBUG | 
| 595 | if (_res.options & RES_DEBUG) | 595 | if (_res.options & RES_DEBUG) | 
| 596 | printf(";;\tndots=%d\n", _res.ndots); | 596 | printf(";;\tndots=%u\n", _res.ndots); | 
| 597 | #endif | 597 | #endif | 
| 598 | } | 598 | } | 
| 599 | } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) { | 599 | } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) { | 
| diff --git a/src/lib/libc/net/res_random.c b/src/lib/libc/net/res_random.c index 7a7d0bd677..c739e4a952 100644 --- a/src/lib/libc/net/res_random.c +++ b/src/lib/libc/net/res_random.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: res_random.c,v 1.11 2002/02/19 19:39:36 millert Exp $ */ | 1 | /* $OpenBSD: res_random.c,v 1.12 2002/06/27 10:14:02 itojun Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> | 4 | * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> | 
| @@ -212,12 +212,12 @@ main(int argc, char **argv) | |||
| 212 | 212 | ||
| 213 | res_initid(); | 213 | res_initid(); | 
| 214 | 214 | ||
| 215 | printf("Generator: %d\n", ru_g); | 215 | printf("Generator: %u\n", ru_g); | 
| 216 | printf("Seed: %d\n", ru_seed); | 216 | printf("Seed: %u\n", ru_seed); | 
| 217 | printf("Reseed at %ld\n", ru_reseed); | 217 | printf("Reseed at %ld\n", ru_reseed); | 
| 218 | printf("Ru_X: %d\n", ru_x); | 218 | printf("Ru_X: %u\n", ru_x); | 
| 219 | printf("Ru_A: %d\n", ru_a); | 219 | printf("Ru_A: %u\n", ru_a); | 
| 220 | printf("Ru_B: %d\n", ru_b); | 220 | printf("Ru_B: %u\n", ru_b); | 
| 221 | 221 | ||
| 222 | n = atoi(argv[1]); | 222 | n = atoi(argv[1]); | 
| 223 | for (i=0;i<n;i++) { | 223 | for (i=0;i<n;i++) { | 
| diff --git a/src/lib/libc/net/rthdr.c b/src/lib/libc/net/rthdr.c index 5cd485889b..7a87b322d1 100644 --- a/src/lib/libc/net/rthdr.c +++ b/src/lib/libc/net/rthdr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rthdr.c,v 1.2 2000/02/29 18:25:52 itojun Exp $ */ | 1 | /* $OpenBSD: rthdr.c,v 1.3 2002/06/27 10:14:02 itojun Exp $ */ | 
| 2 | 2 | ||
| 3 | /* | 3 | /* | 
| 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | 4 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | 
| @@ -100,7 +100,7 @@ inet6_rthdr_add(cmsg, addr, flags) | |||
| 100 | struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr; | 100 | struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr; | 
| 101 | if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) { | 101 | if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) { | 
| 102 | #ifdef DEBUG | 102 | #ifdef DEBUG | 
| 103 | fprintf(stderr, "inet6_rthdr_add: unsupported flag(%d)\n", flags); | 103 | fprintf(stderr, "inet6_rthdr_add: unsupported flag(%u)\n", flags); | 
| 104 | #endif | 104 | #endif | 
| 105 | return(-1); | 105 | return(-1); | 
| 106 | } | 106 | } | 
| @@ -125,7 +125,7 @@ inet6_rthdr_add(cmsg, addr, flags) | |||
| 125 | } | 125 | } | 
| 126 | default: | 126 | default: | 
| 127 | #ifdef DEBUG | 127 | #ifdef DEBUG | 
| 128 | fprintf(stderr, "inet6_rthdr_add: unknown type(%d)\n", | 128 | fprintf(stderr, "inet6_rthdr_add: unknown type(%u)\n", | 
| 129 | rthdr->ip6r_type); | 129 | rthdr->ip6r_type); | 
| 130 | #endif | 130 | #endif | 
| 131 | return(-1); | 131 | return(-1); | 
| @@ -149,7 +149,7 @@ inet6_rthdr_lasthop(cmsg, flags) | |||
| 149 | struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr; | 149 | struct ip6_rthdr0 *rt0 = (struct ip6_rthdr0 *)rthdr; | 
| 150 | if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) { | 150 | if (flags != IPV6_RTHDR_LOOSE && flags != IPV6_RTHDR_STRICT) { | 
| 151 | #ifdef DEBUG | 151 | #ifdef DEBUG | 
| 152 | fprintf(stderr, "inet6_rthdr_lasthop: unsupported flag(%d)\n", flags); | 152 | fprintf(stderr, "inet6_rthdr_lasthop: unsupported flag(%u)\n", flags); | 
| 153 | #endif | 153 | #endif | 
| 154 | return(-1); | 154 | return(-1); | 
| 155 | } | 155 | } | 
| @@ -169,7 +169,7 @@ inet6_rthdr_lasthop(cmsg, flags) | |||
| 169 | } | 169 | } | 
| 170 | default: | 170 | default: | 
| 171 | #ifdef DEBUG | 171 | #ifdef DEBUG | 
| 172 | fprintf(stderr, "inet6_rthdr_lasthop: unknown type(%d)\n", | 172 | fprintf(stderr, "inet6_rthdr_lasthop: unknown type(%u)\n", | 
| 173 | rthdr->ip6r_type); | 173 | rthdr->ip6r_type); | 
| 174 | #endif | 174 | #endif | 
| 175 | return(-1); | 175 | return(-1); | 
| @@ -206,7 +206,7 @@ inet6_rthdr_segments(cmsg) | |||
| 206 | 206 | ||
| 207 | if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) { | 207 | if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) { | 
| 208 | #ifdef DEBUG | 208 | #ifdef DEBUG | 
| 209 | fprintf(stderr, "inet6_rthdr_segments: invalid size(%d)\n", | 209 | fprintf(stderr, "inet6_rthdr_segments: invalid size(%u)\n", | 
| 210 | rt0->ip6r0_len); | 210 | rt0->ip6r0_len); | 
| 211 | #endif | 211 | #endif | 
| 212 | return -1; | 212 | return -1; | 
| @@ -217,7 +217,7 @@ inet6_rthdr_segments(cmsg) | |||
| 217 | 217 | ||
| 218 | default: | 218 | default: | 
| 219 | #ifdef DEBUG | 219 | #ifdef DEBUG | 
| 220 | fprintf(stderr, "inet6_rthdr_segments: unknown type(%d)\n", | 220 | fprintf(stderr, "inet6_rthdr_segments: unknown type(%u)\n", | 
| 221 | rthdr->ip6r_type); | 221 | rthdr->ip6r_type); | 
| 222 | #endif | 222 | #endif | 
| 223 | return -1; | 223 | return -1; | 
| @@ -241,7 +241,7 @@ inet6_rthdr_getaddr(cmsg, index) | |||
| 241 | 241 | ||
| 242 | if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) { | 242 | if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) { | 
| 243 | #ifdef DEBUG | 243 | #ifdef DEBUG | 
| 244 | fprintf(stderr, "inet6_rthdr_getaddr: invalid size(%d)\n", | 244 | fprintf(stderr, "inet6_rthdr_getaddr: invalid size(%u)\n", | 
| 245 | rt0->ip6r0_len); | 245 | rt0->ip6r0_len); | 
| 246 | #endif | 246 | #endif | 
| 247 | return NULL; | 247 | return NULL; | 
| @@ -258,7 +258,7 @@ inet6_rthdr_getaddr(cmsg, index) | |||
| 258 | 258 | ||
| 259 | default: | 259 | default: | 
| 260 | #ifdef DEBUG | 260 | #ifdef DEBUG | 
| 261 | fprintf(stderr, "inet6_rthdr_getaddr: unknown type(%d)\n", | 261 | fprintf(stderr, "inet6_rthdr_getaddr: unknown type(%u)\n", | 
| 262 | rthdr->ip6r_type); | 262 | rthdr->ip6r_type); | 
| 263 | #endif | 263 | #endif | 
| 264 | return NULL; | 264 | return NULL; | 
| @@ -282,7 +282,7 @@ inet6_rthdr_getflags(cmsg, index) | |||
| 282 | 282 | ||
| 283 | if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) { | 283 | if (rt0->ip6r0_len % 2 || 46 < rt0->ip6r0_len) { | 
| 284 | #ifdef DEBUG | 284 | #ifdef DEBUG | 
| 285 | fprintf(stderr, "inet6_rthdr_getflags: invalid size(%d)\n", | 285 | fprintf(stderr, "inet6_rthdr_getflags: invalid size(%u)\n", | 
| 286 | rt0->ip6r0_len); | 286 | rt0->ip6r0_len); | 
| 287 | #endif | 287 | #endif | 
| 288 | return -1; | 288 | return -1; | 
| @@ -302,7 +302,7 @@ inet6_rthdr_getflags(cmsg, index) | |||
| 302 | 302 | ||
| 303 | default: | 303 | default: | 
| 304 | #ifdef DEBUG | 304 | #ifdef DEBUG | 
| 305 | fprintf(stderr, "inet6_rthdr_getflags: unknown type(%d)\n", | 305 | fprintf(stderr, "inet6_rthdr_getflags: unknown type(%u)\n", | 
| 306 | rthdr->ip6r_type); | 306 | rthdr->ip6r_type); | 
| 307 | #endif | 307 | #endif | 
| 308 | return -1; | 308 | return -1; | 
