summaryrefslogtreecommitdiff
path: root/usr.sbin/bind/lib/lwres
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2003-11-18 14:14:09 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2003-11-18 14:14:09 +0000
commita3684c7a7fae3c0a0ad3d9641d29affc2b8aed03 (patch)
treebd1bf1ed050890b02d624a1468c39c2822f5ce45 /usr.sbin/bind/lib/lwres
parent2177e8980dbcbd0b8006b290bb9de8e8565df3ba (diff)
update to BIND v9.2.3. ok todd@
Diffstat (limited to 'usr.sbin/bind/lib/lwres')
-rw-r--r--usr.sbin/bind/lib/lwres/context.c10
-rw-r--r--usr.sbin/bind/lib/lwres/getipnode.c8
-rw-r--r--usr.sbin/bind/lib/lwres/getnameinfo.c8
-rw-r--r--usr.sbin/bind/lib/lwres/getrrset.c6
-rw-r--r--usr.sbin/bind/lib/lwres/lwconfig.c30
-rw-r--r--usr.sbin/bind/lib/lwres/lwinetaton.c12
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_context.32
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_context.docbook6
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_context.html2
-rw-r--r--usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook2
10 files changed, 43 insertions, 43 deletions
diff --git a/usr.sbin/bind/lib/lwres/context.c b/usr.sbin/bind/lib/lwres/context.c
index c84a8819bca..bab830e2a10 100644
--- a/usr.sbin/bind/lib/lwres/context.c
+++ b/usr.sbin/bind/lib/lwres/context.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: context.c,v 1.41 2001/07/19 16:59:32 gson Exp $ */
+/* $ISC: context.c,v 1.41.2.2 2003/10/09 07:32:54 marka Exp $ */
#include <config.h>
@@ -152,14 +152,14 @@ lwres_context_initserial(lwres_context_t *ctx, lwres_uint32_t serial) {
void
lwres_context_freemem(lwres_context_t *ctx, void *mem, size_t len) {
REQUIRE(mem != NULL);
- REQUIRE(len != 0);
+ REQUIRE(len != 0U);
CTXFREE(mem, len);
}
void *
lwres_context_allocmem(lwres_context_t *ctx, size_t len) {
- REQUIRE(len != 0);
+ REQUIRE(len != 0U);
return (CTXMALLOC(len));
}
@@ -349,7 +349,7 @@ lwres_context_sendrecv(lwres_context_t *ctx,
* Type of tv_sec is long, so make sure the unsigned long timeout
* does not overflow it.
*/
- if (ctx->timeout <= LONG_MAX)
+ if (ctx->timeout <= (unsigned int)LONG_MAX)
timeout.tv_sec = (long)ctx->timeout;
else
timeout.tv_sec = LONG_MAX;
diff --git a/usr.sbin/bind/lib/lwres/getipnode.c b/usr.sbin/bind/lib/lwres/getipnode.c
index b6dbbf6b259..9f287517ca7 100644
--- a/usr.sbin/bind/lib/lwres/getipnode.c
+++ b/usr.sbin/bind/lib/lwres/getipnode.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1999-2002 Internet Software Consortium.
+ * Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: getipnode.c,v 1.30.2.3 2002/08/08 21:29:07 marka Exp $ */
+/* $ISC: getipnode.c,v 1.30.2.5 2003/10/09 07:32:55 marka Exp $ */
#include <config.h>
@@ -242,13 +242,13 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
switch (af) {
case AF_INET:
- if (len != INADDRSZ) {
+ if (len != (unsigned int)INADDRSZ) {
*error_num = NO_RECOVERY;
return (NULL);
}
break;
case AF_INET6:
- if (len != IN6ADDRSZ) {
+ if (len != (unsigned int)IN6ADDRSZ) {
*error_num = NO_RECOVERY;
return (NULL);
}
diff --git a/usr.sbin/bind/lib/lwres/getnameinfo.c b/usr.sbin/bind/lib/lwres/getnameinfo.c
index 413f41f9e9b..61a42547b42 100644
--- a/usr.sbin/bind/lib/lwres/getnameinfo.c
+++ b/usr.sbin/bind/lib/lwres/getnameinfo.c
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 1999-2001 Internet Software Consortium.
+ * Portions Copyright (C) 1999-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: getnameinfo.c,v 1.30 2001/07/10 18:25:43 gson Exp $ */
+/* $ISC: getnameinfo.c,v 1.30.2.3 2003/07/23 06:57:56 marka Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -162,7 +162,7 @@ lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
}
proto = (flags & NI_DGRAM) ? "udp" : "tcp";
- if (serv == NULL || servlen == 0) {
+ if (serv == NULL || servlen == 0U) {
/*
* Caller does not want service.
*/
@@ -197,7 +197,7 @@ lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
}
#endif
- if (host == NULL || hostlen == 0) {
+ if (host == NULL || hostlen == 0U) {
/*
* What should we do?
*/
diff --git a/usr.sbin/bind/lib/lwres/getrrset.c b/usr.sbin/bind/lib/lwres/getrrset.c
index 085f435b583..e32cd0b360c 100644
--- a/usr.sbin/bind/lib/lwres/getrrset.c
+++ b/usr.sbin/bind/lib/lwres/getrrset.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2002 Internet Software Consortium.
+ * Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: getrrset.c,v 1.11.2.2 2002/08/05 06:57:16 marka Exp $ */
+/* $ISC: getrrset.c,v 1.11.2.4 2003/10/09 07:32:55 marka Exp $ */
#include <config.h>
@@ -48,7 +48,7 @@ lwresult_to_result(lwres_result_t lwresult) {
static void *
sane_malloc(size_t size) {
- if (size == 0)
+ if (size == 0U)
size = 1;
return (malloc(size));
}
diff --git a/usr.sbin/bind/lib/lwres/lwconfig.c b/usr.sbin/bind/lib/lwres/lwconfig.c
index 8e57396e803..30dbf689883 100644
--- a/usr.sbin/bind/lib/lwres/lwconfig.c
+++ b/usr.sbin/bind/lib/lwres/lwconfig.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000, 2001 Internet Software Consortium.
+ * Copyright (C) 2000, 2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $ISC: lwconfig.c,v 1.33 2001/07/10 18:25:45 gson Exp $ */
+/* $ISC: lwconfig.c,v 1.33.2.2 2003/10/09 07:32:55 marka Exp $ */
/***
*** Module for parsing resolv.conf files.
@@ -156,7 +156,7 @@ getword(FILE *fp, char *buffer, size_t size) {
char *p = buffer;
REQUIRE(buffer != NULL);
- REQUIRE(size > 0);
+ REQUIRE(size > 0U);
*p = '\0';
@@ -195,7 +195,7 @@ lwres_strdup(lwres_context_t *ctx, const char *str) {
size_t len;
REQUIRE(str != NULL);
- REQUIRE(strlen(str) > 0);
+ REQUIRE(strlen(str) > 0U);
len = strlen(str) + 1;
p = CTXMALLOC(len);
@@ -286,7 +286,7 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) {
return (LWRES_R_SUCCESS);
res = getword(fp, word, sizeof(word));
- if (strlen(word) == 0)
+ if (strlen(word) == 0U)
return (LWRES_R_FAILURE); /* Nothing on line. */
else if (res == ' ' || res == '\t')
res = eatwhite(fp);
@@ -314,7 +314,7 @@ lwres_conf_parselwserver(lwres_context_t *ctx, FILE *fp) {
return (LWRES_R_SUCCESS);
res = getword(fp, word, sizeof(word));
- if (strlen(word) == 0)
+ if (strlen(word) == 0U)
return (LWRES_R_FAILURE); /* Nothing on line. */
else if (res == ' ' || res == '\t')
res = eatwhite(fp);
@@ -339,7 +339,7 @@ lwres_conf_parsedomain(lwres_context_t *ctx, FILE *fp) {
confdata = &ctx->confdata;
res = getword(fp, word, sizeof(word));
- if (strlen(word) == 0)
+ if (strlen(word) == 0U)
return (LWRES_R_FAILURE); /* Nothing else on line. */
else if (res == ' ' || res == '\t')
res = eatwhite(fp);
@@ -401,11 +401,11 @@ lwres_conf_parsesearch(lwres_context_t *ctx, FILE *fp) {
confdata->searchnxt = 0;
delim = getword(fp, word, sizeof(word));
- if (strlen(word) == 0)
+ if (strlen(word) == 0U)
return (LWRES_R_FAILURE); /* Nothing else on line. */
idx = 0;
- while (strlen(word) > 0) {
+ while (strlen(word) > 0U) {
if (confdata->searchnxt == LWRES_CONFMAXSEARCH)
goto ignore; /* Too many domains. */
@@ -462,10 +462,10 @@ lwres_conf_parsesortlist(lwres_context_t *ctx, FILE *fp) {
confdata = &ctx->confdata;
delim = getword(fp, word, sizeof(word));
- if (strlen(word) == 0)
+ if (strlen(word) == 0U)
return (LWRES_R_FAILURE); /* Empty line after keyword. */
- while (strlen(word) > 0) {
+ while (strlen(word) > 0U) {
if (confdata->sortlistnxt == LWRES_CONFMAXSORTLIST)
return (LWRES_R_FAILURE); /* Too many values. */
@@ -518,10 +518,10 @@ lwres_conf_parseoption(lwres_context_t *ctx, FILE *fp) {
confdata = &ctx->confdata;
delim = getword(fp, word, sizeof(word));
- if (strlen(word) == 0)
+ if (strlen(word) == 0U)
return (LWRES_R_FAILURE); /* Empty line after keyword. */
- while (strlen(word) > 0) {
+ while (strlen(word) > 0U) {
if (strcmp("debug", word) == 0) {
confdata->resdebug = 1;
} else if (strcmp("no_tld_query", word) == 0) {
@@ -556,7 +556,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
confdata = &ctx->confdata;
REQUIRE(filename != NULL);
- REQUIRE(strlen(filename) > 0);
+ REQUIRE(strlen(filename) > 0U);
REQUIRE(confdata != NULL);
errno = 0;
@@ -571,7 +571,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) {
break;
}
- if (strlen(word) == 0)
+ if (strlen(word) == 0U)
rval = LWRES_R_SUCCESS;
else if (strcmp(word, "nameserver") == 0)
rval = lwres_conf_parsenameserver(ctx, fp);
diff --git a/usr.sbin/bind/lib/lwres/lwinetaton.c b/usr.sbin/bind/lib/lwres/lwinetaton.c
index e6df47a49d0..e517fd1a22f 100644
--- a/usr.sbin/bind/lib/lwres/lwinetaton.c
+++ b/usr.sbin/bind/lib/lwres/lwinetaton.c
@@ -1,5 +1,5 @@
/*
- * Portions Copyright (C) 1996-2001 Internet Software Consortium.
+ * Portions Copyright (C) 1996-2001, 2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -66,7 +66,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static char rcsid[] = "$ISC: lwinetaton.c,v 1.10 2001/01/09 21:59:25 bwelling Exp $";
+static char rcsid[] = "$ISC: lwinetaton.c,v 1.10.2.2 2003/10/09 07:32:55 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include <config.h>
@@ -148,7 +148,7 @@ lwres_net_aton(const char *cp, struct in_addr *addr) {
* a.b.c (with c treated as 16 bits)
* a.b (with b treated as 24 bits)
*/
- if (pp >= parts + 3 || val > 0xff)
+ if (pp >= parts + 3 || val > 0xffU)
return (0);
*pp++ = (lwres_uint8_t)val;
c = *++cp;
@@ -175,19 +175,19 @@ lwres_net_aton(const char *cp, struct in_addr *addr) {
break;
case 2: /* a.b -- 8.24 bits */
- if (val > 0xffffff)
+ if (val > 0xffffffU)
return (0);
val |= parts[0] << 24;
break;
case 3: /* a.b.c -- 8.8.16 bits */
- if (val > 0xffff)
+ if (val > 0xffffU)
return (0);
val |= (parts[0] << 24) | (parts[1] << 16);
break;
case 4: /* a.b.c.d -- 8.8.8.8 bits */
- if (val > 0xff)
+ if (val > 0xffU)
return (0);
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
break;
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_context.3 b/usr.sbin/bind/lib/lwres/man/lwres_context.3
index 50183309bb3..85e60a07ffc 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_context.3
+++ b/usr.sbin/bind/lib/lwres/man/lwres_context.3
@@ -65,7 +65,7 @@ It holds a socket and other data needed for communicating
with a resolver daemon.
The new
\fBlwres_context_t\fR
-is returned throught
+is returned through
\fIcontextp\fR,
a pointer to a
\fBlwres_context_t\fR
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_context.docbook b/usr.sbin/bind/lib/lwres/man/lwres_context.docbook
index 3a0b8499027..8434467abeb 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_context.docbook
+++ b/usr.sbin/bind/lib/lwres/man/lwres_context.docbook
@@ -1,6 +1,6 @@
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
<!--
- - Copyright (C) 2001 Internet Software Consortium.
+ - Copyright (C) 2001, 2003 Internet Software Consortium.
-
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $ISC: lwres_context.docbook,v 1.3 2001/06/18 22:56:16 gson Exp $ -->
+<!-- $ISC: lwres_context.docbook,v 1.3.2.2 2003/07/22 04:03:54 marka Exp $ -->
<refentry>
<refentryinfo>
@@ -109,7 +109,7 @@ It holds a socket and other data needed for communicating
with a resolver daemon.
The new
<type>lwres_context_t</type>
-is returned throught
+is returned through
<parameter>contextp</parameter>,
a pointer to a
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_context.html b/usr.sbin/bind/lib/lwres/man/lwres_context.html
index 90a969fd325..a3aeb4008f7 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_context.html
+++ b/usr.sbin/bind/lib/lwres/man/lwres_context.html
@@ -144,7 +144,7 @@ The new
CLASS="TYPE"
>lwres_context_t</SPAN
>
-is returned throught
+is returned through
<TT
CLASS="PARAMETER"
><I
diff --git a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
index f867e026b58..b95c6b78e62 100644
--- a/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
+++ b/usr.sbin/bind/lib/lwres/man/lwres_getipnode.docbook
@@ -16,7 +16,7 @@
- WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-->
-<!-- $ISC: lwres_getipnode.docbook,v 1.4.118.2 2003/02/17 07:05:11 marka Exp $ -->
+<!-- $ISC: lwres_getipnode.docbook,v 1.4.2.2 2003/03/06 04:38:26 marka Exp $ -->
<refentry>