BIND 9.3.0 has a number of new features over 9.2,
including:
+ DNSSEC is now DS based.
+ See doc/draft/draft-ietf-dnsext-dnssec-*
+
+ DNSSEC lookaside validation.
+
+ check-names is now implemented.
+ rrset-order in more complete.
+
+ IPv4/IPv6 transition support, dual-stack-servers.
+
+ IXFR deltas can now be generated when loading master files,
+ ixfr-from-differences.
+
+ It is now possible to specify the size of a journal, max-journal-size.
+
+ It is now possible to define a named set of master servers to be
+ used in masters clause, masters.
+
+ The advertised EDNS UDP size can now be set, edns-udp-size.
+
+ allow-v6-synthesis has been obsoleted.
+
NOTE:
* Zones containing MD and MF will now be rejected.
* dig, nslookup name. now report "Not Implemented" as
NOTIMP rather than NOTIMPL. This will have impact on scripts
that are looking for NOTIMPL.
+ libbind: corresponds to that from BIND 8.4.5.
BIND 9.2.0
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: ifconfig.sh,v 1.45 2004/03/10 02:19:52 marka Exp $
+# $Id: ifconfig.sh,v 1.46 2004/03/18 02:57:54 marka Exp $
#
# Set up interface aliases for bind9 system tests.
*-sun-solaris2.[6-7])
ifconfig lo0:$int 10.53.0.$ns netmask 0xffffffff up
;;
- *-*-solaris2.8)
- ifconfig lo0:$int plumb
- ifconfig lo0:$int 10.53.0.$ns up
+ *-*-solaris2.[8-9])
+ /sbin/ifconfig lo0:$int plumb
+ /sbin/ifconfig lo0:$int 10.53.0.$ns up
;;
*-*-linux*)
ifconfig lo:$int 10.53.0.$ns up netmask 255.255.255.0
Copyright (C) 2000-2003 Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
-$Id: release,v 1.59 2004/03/13 04:08:07 sra Exp $
+$Id: release,v 1.60 2004/03/18 02:57:55 marka Exp $
Preparing a bind9 release
$ CFLAGS=-I/usr/local/include ./configure '--with-iconv=-L/usr/local/lib -liconv'
[ Sample on freebsd -- formerly used giconv, now uses iconv ]
- ./configure --with-iconv-include=/usr/local/include \
+ ./configure --with-iconv-include=/usr/local/include \
'--with-iconv=-L/usr/local/lib -liconv'
$ make
#ifndef SAFE_FREE
#define SAFE_FREE(a) \
do{if(a != NULL){memset(a,0, sizeof(*a)); free(a); a=NULL;}} while (0)
-#define SAFE_FREE2(a,s) if (a != NULL && s > 0){memset(a,0, s);free(a); a=NULL;}
+#define SAFE_FREE2(a,s) if (a != NULL && (long)s > 0){memset(a,0, s);free(a); a=NULL;}
#endif
typedef struct dst_func {
int sw,sc;
ULONG l;
- if (len == 0) return;
+ if (len == 0U) return;
l=(c->Nl+(len<<3))&0xffffffffL;
/* 95-05-24 eay Fixed a bug with the overflow handling, thanks to
sw=c->num>>2;
sc=c->num&0x03;
- if ((c->num+len) >= MD5_CBLOCK)
+ if ((c->num+len) >= (size_t)MD5_CBLOCK)
{
l= p[sw];
p_c2l(data,l,sc);
int ew,ec;
c->num+=(int)len;
- if ((sc+len) < 4) /* ugly, add char's to a word */
+ if ((sc+len) < 4U) /* ugly, add char's to a word */
{
l= p[sw];
p_c2l_p(data,l,sc,len);
/* we now can process the input data in blocks of MD5_CBLOCK
* chars and save the leftovers to c->data. */
p=c->data;
- while (len >= MD5_CBLOCK)
+ while (len >= (size_t)MD5_CBLOCK)
{
#if defined(L_ENDIAN) || defined(B_ENDIAN)
memcpy(p,data,MD5_CBLOCK);
switch (sc) \
{ \
case 0: l =((unsigned long)(*((c)++))); \
- if (--len == 0) break; \
+ if (--len == 0U) break; \
case 1: l|=((unsigned long)(*((c)++)))<< 8; \
- if (--len == 0) break; \
+ if (--len == 0U) break; \
case 2: l|=((unsigned long)(*((c)++)))<<16; \
} \
}
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
-static const char rcsid[] = "$Id: inet_addr.c,v 1.3 2004/03/09 06:29:56 marka Exp $";
+static const char rcsid[] = "$Id: inet_addr.c,v 1.4 2004/03/18 02:57:56 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
* 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++ = val;
c = *++cp;
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;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.3 2004/03/09 06:29:57 marka Exp $";
+static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.4 2004/03/18 02:57:56 marka Exp $";
#endif
#include "port_before.h"
if (bits == -1)
len = 4;
else
- for (len = 1, b = 1 ; b < 4; b++)
+ for (len = 1, b = 1 ; b < 4U; b++)
if (*(src + b))
len = b + 1;
if (len > bytes)
bytes = len;
b = decoct(src, bytes, dst, size);
- if (b == 0)
+ if (b == 0U)
goto emsgsize;
dst += b;
size -= b;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.4 2004/03/09 06:29:57 marka Exp $";
+static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.5 2004/03/18 02:57:57 marka Exp $";
#endif
#include "port_before.h"
if (tmp > 255)
goto enoent;
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
- if (size-- == 0)
+ if (size-- == 0U)
goto emsgsize;
*dst++ = (u_char) tmp;
if (ch == '\0' || ch == '/')
goto enoent;
/* Extend address to four octets. */
- while (size-- > 0)
+ while (size-- > 0U)
*dst++ = 0;
*pbits = bits;
{
u_long addr;
- if (net < 128)
+ if (net < 128U)
addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
- else if (net < 65536)
+ else if (net < 65536U)
addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
else if (net < 16777216L)
addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_net_pton.c,v 1.6 2004/03/09 06:29:57 marka Exp $";
+static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7 2004/03/18 02:57:57 marka Exp $";
#endif
#include "port_before.h"
&& isascii((unsigned char)(src[1]))
&& isxdigit((unsigned char)(src[1]))) {
/* Hexadecimal: Eat nybble string. */
- if (size <= 0)
+ if (size <= 0U)
goto emsgsize;
dirty = 0;
src++; /* skip x or X. */
else
tmp = (tmp << 4) | n;
if (++dirty == 2) {
- if (size-- <= 0)
+ if (size-- <= 0U)
goto emsgsize;
*dst++ = (u_char) tmp;
dirty = 0;
}
}
if (dirty) { /* Odd trailing nybble? */
- if (size-- <= 0)
+ if (size-- <= 0U)
goto emsgsize;
*dst++ = (u_char) (tmp << 4);
}
goto enoent;
} while ((ch = *src++) != '\0' &&
isascii(ch) && isdigit(ch));
- if (size-- <= 0)
+ if (size-- <= 0U)
goto emsgsize;
*dst++ = (u_char) tmp;
if (ch == '\0' || ch == '/')
}
/* Extend network to cover the actual mask. */
while (bits > ((dst - odst) * 8)) {
- if (size-- <= 0)
+ if (size-- <= 0U)
goto emsgsize;
*dst++ = '\0';
}
base = 16, cp++;
while ((c = *cp) != 0) {
if (isdigit((unsigned char)c)) {
- if (base == 8 && (c == '8' || c == '9'))
+ if (base == 8U && (c == '8' || c == '9'))
return (INADDR_NONE);
val = (val * base) + (c - '0');
cp++;
digit = 1;
continue;
}
- if (base == 16 && isxdigit((unsigned char)c)) {
+ if (base == 16U && isxdigit((unsigned char)c)) {
val = (val << 4) +
(c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
cp++;
if (!digit)
return (INADDR_NONE);
if (*cp == '.') {
- if (pp >= parts + 4 || val > 0xff)
+ if (pp >= parts + 4 || val > 0xffU)
return (INADDR_NONE);
*pp++ = val, cp++;
goto again;
return (INADDR_NONE);
*pp++ = val;
n = pp - parts;
- if (n > 4)
+ if (n > 4U)
return (INADDR_NONE);
for (val = 0, i = 0; i < n; i++) {
val <<= 8;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns.c,v 1.2 2004/03/09 06:29:59 marka Exp $";
+static const char rcsid[] = "$Id: dns.c,v 1.3 2004/03/18 02:57:58 marka Exp $";
#endif
/*
dns_res_set(this, res, free);
}
- if ((dns->res->options & RES_INIT) == 0 &&
+ if ((dns->res->options & RES_INIT) == 0U &&
res_ninit(dns->res) < 0)
return (NULL);
/* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_ho.c,v 1.13 2004/03/09 06:29:59 marka Exp $";
+static const char rcsid[] = "$Id: dns_ho.c,v 1.14 2004/03/18 02:57:58 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports. */
q2->qtype = T_PTR;
q2->answer = q2->qbuf.buf;
q2->anslen = sizeof(q2->qbuf);
- if ((pvt->res->options & RES_NO_NIBBLE2) != 0)
+ if ((pvt->res->options & RES_NO_NIBBLE2) != 0U)
q2->action = RESTGT_IGNORE;
else
q2->action = RESTGT_AFTERFAILURE;
}
cp += n;
#ifdef RES_USE_DNAME
- if ((pvt->res->options & RES_USE_DNAME) != 0)
+ if ((pvt->res->options & RES_USE_DNAME) != 0U)
#endif
{
/*
if (!pvt->res && !ho_res_get(this))
return (-1);
- if (((pvt->res->options & RES_INIT) == 0) &&
+ if (((pvt->res->options & RES_INIT) == 0U) &&
res_ninit(pvt->res) == -1)
return (-1);
return (0);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_nw.c,v 1.8 2004/03/09 06:29:59 marka Exp $";
+static const char rcsid[] = "$Id: dns_nw.c,v 1.9 2004/03/18 02:57:58 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports. */
if (!pvt->res && !nw_res_get(this))
return (-1);
- if (((pvt->res->options & RES_INIT) == 0) &&
+ if (((pvt->res->options & RES_INIT) == 0U) &&
res_ninit(pvt->res) == -1)
return (-1);
return (0);
*/
/*
- * $Id: dns_p.h,v 1.2 2004/03/09 06:29:59 marka Exp $
+ * $Id: dns_p.h,v 1.3 2004/03/18 02:57:58 marka Exp $
*/
#ifndef _DNS_P_H_INCLUDED
#define _DNS_P_H_INCLUDED
-#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0 || \
+#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
(ok)(nm) != 0)
#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: gen.c,v 1.4 2004/03/09 06:30:00 marka Exp $";
+static const char rcsid[] = "$Id: gen.c,v 1.5 2004/03/18 02:57:58 marka Exp $";
#endif
/*
gen_res_set(this, res, free);
}
- if (((irs->res->options & RES_INIT) == 0) && res_ninit(irs->res) < 0)
+ if (((irs->res->options & RES_INIT) == 0U) && res_ninit(irs->res) < 0)
return (NULL);
return (irs->res);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: gen_ho.c,v 1.2 2004/03/09 06:30:00 marka Exp $";
+static const char rcsid[] = "$Id: gen_ho.c,v 1.3 2004/03/18 02:57:58 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports */
if (!pvt->res && !ho_res_get(this))
return (-1);
- if (((pvt->res->options & RES_INIT) == 0) &&
+ if (((pvt->res->options & RES_INIT) == 0U) &&
(res_ninit(pvt->res) == -1))
return (-1);
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: gen_nw.c,v 1.2 2004/03/09 06:30:00 marka Exp $";
+static const char rcsid[] = "$Id: gen_nw.c,v 1.3 2004/03/18 02:57:58 marka Exp $";
#endif
/* Imports */
if (!pvt->res && !nw_res_get(this))
return (-1);
- if (((pvt->res->options & RES_INIT) == 0) &&
+ if (((pvt->res->options & RES_INIT) == 0U) &&
res_ninit(pvt->res) == -1)
return (-1);
return (0);
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: gethostent.c,v 1.5 2004/03/09 06:30:01 marka Exp $";
+static const char rcsid[] = "$Id: gethostent.c,v 1.6 2004/03/18 02:57:59 marka Exp $";
#endif
/* Imports */
return (NULL);
while ((hp = (*ho->next)(ho)) != NULL &&
hp->h_addrtype == AF_INET6 &&
- (net_data->res->options & RES_USE_INET6) == 0)
+ (net_data->res->options & RES_USE_INET6) == 0U)
continue;
net_data->ho_last = hp;
return (net_data->ho_last);
switch (af) {
case AF_INET:
- if (len != INADDRSZ) {
+ if (len != (size_t)INADDRSZ) {
*error_num = NO_RECOVERY;
return (NULL);
}
break;
case AF_INET6:
- if (len != IN6ADDRSZ) {
+ if (len != (size_t)IN6ADDRSZ) {
*error_num = NO_RECOVERY;
return (NULL);
}
}
strncpy(pvt->name, name, NS_MAXDNAME);
pvt->name[NS_MAXDNAME] = '\0';
- if (af == AF_INET && (net_data->res->options & RES_USE_INET6) != 0) {
+ if (af == AF_INET && (net_data->res->options & RES_USE_INET6) != 0U) {
map_v4v6_address(pvt->addr, pvt->addr);
af = AF_INET6;
}
port = ((const struct sockinet *)sa)->si_port; /* network byte order */
addr = (const char *)sa + afd->a_off;
- if (serv == NULL || servlen == 0) {
+ if (serv == NULL || servlen == 0U) {
/*
* rfc2553bis says that serv == NULL or servlen == 0 means that
* the caller does not want the result.
}
break;
}
- if (host == NULL || hostlen == 0) {
+ if (host == NULL || hostlen == 0U) {
/*
* rfc2553bis says that host == NULL or hostlen == 0 means that
* the caller does not want the result.
#ifdef NI_NUMERICSCOPE
if (flags & NI_NUMERICSCOPE) {
sprintf(tmp, "%u", sa6->sin6_scope_id);
- if (bufsiz != 0) {
+ if (bufsiz != 0U) {
strncpy(buf, tmp, bufsiz - 1);
buf[bufsiz - 1] = '\0';
}
/* last resort */
sprintf(tmp, "%u", sa6->sin6_scope_id);
- if (bufsiz != 0) {
+ if (bufsiz != 0U) {
strncpy(buf, tmp, bufsiz - 1);
buf[bufsiz - 1] = '\0';
}
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: getnetent.c,v 1.5 2004/03/09 06:30:01 marka Exp $";
+static const char rcsid[] = "$Id: getnetent.c,v 1.6 2004/03/18 02:57:59 marka Exp $";
#endif
/* Imports */
return (net_data->nw_last);
/* cannonize net(host order) */
- if (net < 256) {
+ if (net < 256UL) {
net <<= 24;
bits = 8;
- } else if (net < 65536) {
+ } else if (net < 65536UL) {
net <<= 16;
bits = 16;
- } else if (net < 16777216) {
+ } else if (net < 16777216UL) {
net <<= 8;
bits = 24;
} else
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: hesiod.c,v 1.3 2004/03/09 06:30:02 marka Exp $";
+static const char rcsid[] = "$Id: hesiod.c,v 1.4 2004/03/18 02:57:59 marka Exp $";
#endif
/*
if (!ctx->res && !__hesiod_res_get(ctx))
return (-1);
- if (((ctx->res->options & RES_INIT) == 0) &&
+ if (((ctx->res->options & RES_INIT) == 0U) &&
(res_ninit(ctx->res) == -1))
return (-1);
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: irp.c,v 1.5 2004/03/09 06:30:03 marka Exp $";
+static const char rcsid[] = "$Id: irp.c,v 1.6 2004/03/18 02:57:59 marka Exp $";
#endif
/* Imports */
if (sscanf(line, "%d", &code) != 1) {
code = 0;
- } else if (text != NULL && textlen > 0) {
+ } else if (text != NULL && textlen > 0U) {
p = line;
while (isspace((unsigned char)*p)) p++;
while (isdigit((unsigned char)*p)) p++;
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: irpmarshall.c,v 1.4 2004/03/09 06:30:03 marka Exp $";
+static const char rcsid[] = "$Id: irpmarshall.c,v 1.5 2004/03/18 02:57:59 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#if 0
/* gr_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* gr_gid field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* s_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* s_port field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* p_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* p_proto field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* h_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* h_addrtype field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
if (strcmp(tmpbuf, "AF_INET") == 0)
/* h_length field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
t = strtol(tmpbuf, &tb, 10);
/* n_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* h_addrtype field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
if (strcmp(tmpbuf, "AF_INET") == 0)
/* n_net field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
nnet = 0;
/* n_name field */
name = NULL;
- if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+ if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
goto error;
}
/* h_addrtype field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
if (strcmp(tmpbuf, "AF_INET") == 0)
/* n_net field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
- strlen(tb) == 0) {
+ strlen(tb) == 0U) {
goto error;
}
bits = inet_net_pton(naddrtype, tmpbuf, &nnet, sizeof nnet);
static void
free_array(char **argv, size_t entries) {
char **p = argv;
- int useEntries = (entries > 0);
+ int useEntries = (entries > 0U);
if (argv == NULL)
return;
- while ((useEntries && entries > 0) || *p) {
+ while ((useEntries && entries > 0U) || *p) {
if (*p)
free(*p);
p++;
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: irs_data.c,v 1.6 2004/03/09 06:30:03 marka Exp $";
+static const char rcsid[] = "$Id: irs_data.c,v 1.7 2004/03/18 02:57:59 marka Exp $";
#endif
#include "port_before.h"
return (NULL);
}
- if ((net_data->res->options & RES_INIT) == 0 &&
+ if ((net_data->res->options & RES_INIT) == 0U &&
res_ninit(net_data->res) == -1) {
(*net_data->irs->close)(net_data->irs);
memput(net_data, sizeof (struct net_data));
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: lcl.c,v 1.2 2004/03/09 06:30:03 marka Exp $";
+static const char rcsid[] = "$Id: lcl.c,v 1.3 2004/03/18 02:57:59 marka Exp $";
#endif
/* Imports */
lcl_res_set(this, res, free);
}
- if ((lcl->res->options & RES_INIT) == 0 &&
+ if ((lcl->res->options & RES_INIT) == 0U &&
res_ninit(lcl->res) < 0)
return (NULL);
/* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: lcl_ho.c,v 1.2 2004/03/09 06:30:04 marka Exp $";
+static const char rcsid[] = "$Id: lcl_ho.c,v 1.3 2004/03/18 02:57:59 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports. */
if (!pvt->res && !ho_res_get(this))
return (-1);
- if (((pvt->res->options & RES_INIT) == 0) &&
+ if (((pvt->res->options & RES_INIT) == 0U) &&
res_ninit(pvt->res) == -1)
return (-1);
return (0);
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: lcl_nw.c,v 1.2 2004/03/09 06:30:04 marka Exp $";
+static const char rcsid[] = "$Id: lcl_nw.c,v 1.3 2004/03/18 02:57:59 marka Exp $";
/* from getgrent.c 8.2 (Berkeley) 3/21/94"; */
/* from BSDI Id: getgrent.c,v 2.8 1996/05/28 18:15:14 bostic Exp $ */
#endif /* LIBC_SCCS and not lint */
if (!pvt->res && !nw_res_get(this))
return (-1);
- if (((pvt->res->options & RES_INIT) == 0) &&
+ if (((pvt->res->options & RES_INIT) == 0U) &&
res_ninit(pvt->res) == -1)
return (-1);
return (0);
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: base64.c,v 1.2 2004/03/09 06:30:06 marka Exp $";
+static const char rcsid[] = "$Id: base64.c,v 1.3 2004/03/18 02:57:59 marka Exp $";
#endif /* not lint */
#include "port_before.h"
u_char output[4];
size_t i;
- while (2 < srclength) {
+ while (2U < srclength) {
input[0] = *src++;
input[1] = *src++;
input[2] = *src++;
}
/* Now we worry about padding. */
- if (0 != srclength) {
+ if (0U != srclength) {
/* Get what's left. */
input[0] = input[1] = input[2] = '\0';
for (i = 0; i < srclength; i++)
return (-1);
target[datalength++] = Base64[output[0]];
target[datalength++] = Base64[output[1]];
- if (srclength == 1)
+ if (srclength == 1U)
target[datalength++] = Pad64;
else
target[datalength++] = Base64[output[2]];
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_clnt.c,v 1.6 2004/03/09 06:30:07 marka Exp $";
+static const char rcsid[] = "$Id: ctl_clnt.c,v 1.7 2004/03/18 02:58:00 marka Exp $";
#endif /* not lint */
/*
default:
abort();
}
- if (len >= MAX_LINELEN) {
+ if (len >= (size_t)MAX_LINELEN) {
errno = EMSGSIZE;
return (-1);
}
(*tran->donefunc)(ctx, tran->uap, ctx->inbuf.text,
(done ? 0 : CTL_MORE));
ctx->inbuf.used -= ((eos - ctx->inbuf.text) + 1);
- if (ctx->inbuf.used == 0)
+ if (ctx->inbuf.used == 0U)
ctl_bufput(&ctx->inbuf);
else
memmove(ctx->inbuf.text, eos + 1, ctx->inbuf.used);
goto again;
return;
}
- if (ctx->inbuf.used == MAX_LINELEN) {
+ if (ctx->inbuf.used == (size_t)MAX_LINELEN) {
(*ctx->logger)(ctl_error, "%s: line too long (%-10s...)", me,
ctx->inbuf.text);
error(ctx);
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_p.c,v 1.2 2004/03/09 06:30:07 marka Exp $";
+static const char rcsid[] = "$Id: ctl_p.c,v 1.3 2004/03/18 02:58:00 marka Exp $";
#endif /* not lint */
/*
ctl_bufget(struct ctl_buf *buf, ctl_logfunc logger) {
static const char me[] = "ctl_bufget";
- REQUIRE(!allocated_p(*buf) && buf->used == 0);
+ REQUIRE(!allocated_p(*buf) && buf->used == 0U);
buf->text = memget(MAX_LINELEN);
if (!allocated_p(*buf)) {
(*logger)(ctl_error, "%s: getmem: %s", me, strerror(errno));
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_srvr.c,v 1.5 2004/03/09 06:30:07 marka Exp $";
+static const char rcsid[] = "$Id: ctl_srvr.c,v 1.6 2004/03/18 02:58:00 marka Exp $";
#endif /* not lint */
/*
me, address_expr);
goto untimely;
}
- if (sizeof "000-\r\n" + strlen(text) > MAX_LINELEN) {
+ if (sizeof "000-\r\n" + strlen(text) > (size_t)MAX_LINELEN) {
(*ctx->logger)(ctl_error, "%s: %s: output buffer ovf, closing",
me, address_expr);
goto untimely;
ctl_docommand(sess);
}
sess->inbuf.used -= ((eos - sess->inbuf.text) + 1);
- if (sess->inbuf.used == 0)
+ if (sess->inbuf.used == 0U)
ctl_bufput(&sess->inbuf);
else
memmove(sess->inbuf.text, eos + 1, sess->inbuf.used);
return;
}
- if (sess->inbuf.used == MAX_LINELEN) {
+ if (sess->inbuf.used == (size_t)MAX_LINELEN) {
(*ctx->logger)(ctl_error, "%s: %s: line too long, closing",
me, address_expr);
ctl_close(sess);
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_streams.c,v 1.3 2004/03/09 06:30:07 marka Exp $";
+static const char rcsid[] = "$Id: ev_streams.c,v 1.4 2004/03/18 02:58:00 marka Exp $";
#endif
#include "port_before.h"
/* Pull off or truncate lead iovec(s). */
static void
consume(evStream *str, size_t bytes) {
- while (bytes > 0) {
+ while (bytes > 0U) {
if (bytes < (size_t)str->iovCur->iov_len) {
str->iovCur->iov_len -= bytes;
str->iovCur->iov_base = (void *)
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_timers.c,v 1.4 2004/03/09 06:30:07 marka Exp $";
+static const char rcsid[] = "$Id: ev_timers.c,v 1.5 2004/03/18 02:58:00 marka Exp $";
#endif
/* Import. */
(long)due.tv_sec, due.tv_nsec,
(long)inter.tv_sec, inter.tv_nsec);
- if (due.tv_sec < 0 || due.tv_nsec < 0)
+#ifdef __hpux
+ /*
+ * tv_sec and tv_nsec are unsigned.
+ */
+ if (due.tv_nsec >= BILLION)
EV_ERR(EINVAL);
- if (inter.tv_sec < 0 || inter.tv_nsec < 0)
+ if (inter.tv_nsec >= BILLION)
+ EV_ERR(EINVAL);
+#else
+ if (due.tv_sec < 0 || due.tv_nsec < 0 || due.tv_nsec >= BILLION)
EV_ERR(EINVAL);
+ if (inter.tv_sec < 0 || inter.tv_nsec < 0 || inter.tv_nsec >= BILLION)
+ EV_ERR(EINVAL);
+#endif
+
/* due={0,0} is a magic cookie meaning "now." */
- if (due.tv_sec == 0 && due.tv_nsec == 0L)
+ if (due.tv_sec == (time_t)0 && due.tv_nsec == 0L)
due = evNowTime();
/* Allocate and fill. */
evTimer *timer = id.opaque;
int result=0;
+ UNUSED(value);
+
if (heap_element(ctx->timers, timer->index) != timer)
EV_ERR(ENOENT);
if (heap_element(ctx->timers, timer->index) != timer)
EV_ERR(ENOENT);
- if (due.tv_sec < 0 || due.tv_nsec < 0)
+#ifdef __hpux
+ /*
+ * tv_sec and tv_nsec are unsigned.
+ */
+ if (due.tv_nsec >= BILLION)
EV_ERR(EINVAL);
- if (inter.tv_sec < 0 || inter.tv_nsec < 0)
+ if (inter.tv_nsec >= BILLION)
EV_ERR(EINVAL);
+#else
+ if (due.tv_sec < 0 || due.tv_nsec < 0 || due.tv_nsec >= BILLION)
+ EV_ERR(EINVAL);
+
+ if (inter.tv_sec < 0 || inter.tv_nsec < 0 || inter.tv_nsec >= BILLION)
+ EV_ERR(EINVAL);
+#endif
old_due = timer->due;
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: eventlib.c,v 1.4 2004/03/09 06:30:07 marka Exp $";
+static const char rcsid[] = "$Id: eventlib.c,v 1.5 2004/03/18 02:58:00 marka Exp $";
#endif
#include "port_before.h"
* Timer is still there. Delete it if it has expired,
* otherwise set it according to its next interval.
*/
- if (this->inter.tv_sec == 0 && this->inter.tv_nsec == 0L) {
+ if (this->inter.tv_sec == (time_t)0 &&
+ this->inter.tv_nsec == 0L) {
opaque.opaque = this;
(void) evClearTimer(opaqueCtx, opaque);
} else {
goto formerr;
x = (x<<4) | (s - hex);
if (++n == 2) {
- if (len > 0) {
+ if (len > 0U) {
*buf++ = x;
len--;
} else
{
size_t i = 0;
- if (len1 < 4)
+ if (len1 < 4U)
len1 = 4;
- if (len2 < 4)
+ if (len2 < 4U)
len2 = 4;
- while (buflen > 0) {
+ while (buflen > 0U) {
fputc(hex[(buf[0]>>4)&0xf], fp);
fputc(hex[buf[0]&0xf], fp);
i += 2;
void
isc_tohex(const unsigned char *buf, size_t buflen, char *t) {
- while (buflen > 0) {
+ while (buflen > 0U) {
*t++ = hex[(buf[0]>>4)&0xf];
*t++ = hex[buf[0]&0xf];
buf++;
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: logging.c,v 1.5 2004/03/09 06:30:08 marka Exp $";
+static const char rcsid[] = "$Id: logging.c,v 1.6 2004/03/18 02:58:00 marka Exp $";
#endif /* not lint */
#include "port_before.h"
/*
* Need to have room for '.nn' (XXX assumes LOG_MAX_VERSIONS < 100)
*/
- if (strlen(chan->out.file.name) > (PATH_MAX-3))
+ if (strlen(chan->out.file.name) > (size_t)(PATH_MAX-3))
return;
for (ver--; ver > 0; ver--) {
sprintf(old_name, "%s.%d", chan->out.file.name, ver-1);
if (!did_vsprintf) {
if (VSPRINTF((lc->buffer, format, args)) >
- LOG_BUFFER_SIZE) {
+ (size_t)LOG_BUFFER_SIZE) {
syslog(LOG_CRIT,
"memory overrun in log_vwrite()");
exit(1);
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: memcluster.c,v 1.4 2004/03/09 06:30:08 marka Exp $";
+static const char rcsid[] = "$Id: memcluster.c,v 1.5 2004/03/18 02:58:00 marka Exp $";
#endif /* not lint */
#include "port_before.h"
errno = EEXIST;
return (-1);
}
- if (init_max_size == 0)
+ if (init_max_size == 0U)
max_size = DEF_MAX_SIZE;
else
max_size = init_max_size;
- if (target_size == 0)
+ if (target_size == 0U)
mem_target = DEF_MEM_TARGET;
else
mem_target = target_size;
if (freelists == NULL)
if (meminit(0, 0) == -1)
return (NULL);
- if (size == 0) {
+ if (size == 0U) {
errno = EINVAL;
return (NULL);
}
REQUIRE(freelists != NULL);
- if (size == 0) {
+ if (size == 0U) {
errno = EINVAL;
return;
}
free(mem);
#endif
- INSIST(stats[max_size].gets != 0);
+ INSIST(stats[max_size].gets != 0U);
stats[max_size].gets--;
return;
}
* max. size (max_size) ends up getting recorded as a call to
* max_size.
*/
- INSIST(stats[size].gets != 0);
+ INSIST(stats[size].gets != 0U);
stats[size].gets--;
stats[new_size].freefrags++;
}
for (i = 1; i <= max_size; i++) {
const struct stats *s = &stats[i];
- if (s->totalgets == 0 && s->gets == 0)
+ if (s->totalgets == 0U && s->gets == 0U)
continue;
fprintf(out, "%s%5d: %11lu gets, %11lu rem",
(i == max_size) ? ">=" : " ",
i, s->totalgets, s->gets);
- if (s->blocks != 0)
+ if (s->blocks != 0U)
fprintf(out, " (%lu bl, %lu ff)",
s->blocks, s->freefrags);
fputc('\n', out);
if (stats == NULL)
return (0);
for (i = 1; i <= max_size; i++)
- if (stats[i].gets != 0)
+ if (stats[i].gets != 0U)
return (1);
return (0);
}
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_date.c,v 1.4 2004/03/09 06:30:09 marka Exp $";
+static const char rcsid[] = "$Id: ns_date.c,v 1.5 2004/03/18 02:58:01 marka Exp $";
#endif
/* Import. */
static const int days_per_month[12] =
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
- if (strlen(cp) != 14) {
+ if (strlen(cp) != 14U) {
*errp = 1;
return (0);
}
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_print.c,v 1.5 2004/03/09 06:30:09 marka Exp $";
+static const char rcsid[] = "$Id: ns_print.c,v 1.6 2004/03/18 02:58:01 marka Exp $";
#endif
/* Import. */
addlen(x, &buf, &buflen);
len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
T(addstr(tmp, len, &buf, &buflen));
- if (rdlen == 0)
+ if (rdlen == 0U)
return (buf - obuf);
T(spaced = addtab(x + len, 16, spaced, &buf, &buflen));
*/
switch (type) {
case ns_t_a:
- if (rdlen != NS_INADDRSZ)
+ if (rdlen != (size_t)NS_INADDRSZ)
goto formerr;
(void) inet_ntop(AF_INET, rdata, buf, buflen);
addlen(strlen(buf), &buf, &buflen);
case ns_t_rt: {
u_int t;
- if (rdlen < NS_INT16SZ)
+ if (rdlen < (size_t)NS_INT16SZ)
goto formerr;
/* Priority. */
case ns_t_px: {
u_int t;
- if (rdlen < NS_INT16SZ)
+ if (rdlen < (size_t)NS_INT16SZ)
goto formerr;
/* Priority. */
}
case ns_t_aaaa:
- if (rdlen != NS_IN6ADDRSZ)
+ if (rdlen != (size_t)NS_IN6ADDRSZ)
goto formerr;
(void) inet_ntop(AF_INET6, rdata, buf, buflen);
addlen(strlen(buf), &buf, &buflen);
u_int order, preference;
char t[50];
- if (rdlen < 2*NS_INT16SZ)
+ if (rdlen < 2U*NS_INT16SZ)
goto formerr;
/* Order, Precedence. */
u_int priority, weight, port;
char t[50];
- if (rdlen < NS_INT16SZ*3)
+ if (rdlen < 3U*NS_INT16SZ)
goto formerr;
/* Priority, Weight, Port. */
case ns_t_wks: {
int n, lcnt;
- if (rdlen < NS_INT32SZ + 1)
+ if (rdlen < 1U + NS_INT32SZ)
goto formerr;
/* Address. */
const char *leader;
int n;
- if (rdlen < NS_INT16SZ + NS_INT8SZ + NS_INT8SZ)
+ if (rdlen < 0U + NS_INT16SZ + NS_INT8SZ + NS_INT8SZ)
goto formerr;
/* Key flags, Protocol, Algorithm. */
u_long t;
int n;
- if (rdlen < 22)
+ if (rdlen < 22U)
goto formerr;
/* Type covered, Algorithm, Label count, Original TTL. */
int pbyte, pbit;
/* prefix length */
- if (rdlen == 0) goto formerr;
+ if (rdlen == 0U) goto formerr;
len = SPRINTF((tmp, "%d ", *rdata));
T(addstr(tmp, len, &buf, &buflen));
pbit = *rdata;
newlen = prune_origin(*buf, origin);
if (**buf == '\0') {
goto root;
- } else if (newlen == 0) {
+ } else if (newlen == 0U) {
/* Use "@" instead of name. */
if (newlen + 2 > *buflen)
goto enospc; /* No room for "@\0". */
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_samedomain.c,v 1.4 2004/03/09 06:30:10 marka Exp $";
+static const char rcsid[] = "$Id: ns_samedomain.c,v 1.5 2004/03/18 02:58:01 marka Exp $";
#endif
#include "port_before.h"
lb = strlen(b);
/* Ignore a trailing label separator (i.e. an unescaped dot) in 'a'. */
- if (la != 0 && a[la - 1] == '.') {
+ if (la != 0U && a[la - 1] == '.') {
escaped = 0;
/* Note this loop doesn't get executed if la==1. */
for (i = la - 2; i >= 0; i--)
}
/* Ignore a trailing label separator (i.e. an unescaped dot) in 'b'. */
- if (lb != 0 && b[lb - 1] == '.') {
+ if (lb != 0U && b[lb - 1] == '.') {
escaped = 0;
/* note this loop doesn't get executed if lb==1 */
for (i = lb - 2; i >= 0; i--)
}
/* lb == 0 means 'b' is the root domain, so 'a' must be in 'b'. */
- if (lb == 0)
+ if (lb == 0U)
return (1);
/* 'b' longer than 'a' means 'a' can't be in 'b'. */
return (-1);
}
strcpy(dst, src);
- while (n >= 1 && dst[n - 1] == '.') /* Ends in "." */
- if (n >= 2 && dst[n - 2] == '\\' && /* Ends in "\." */
- (n < 3 || dst[n - 3] != '\\')) /* But not "\\." */
+ while (n >= 1U && dst[n - 1] == '.') /* Ends in "." */
+ if (n >= 2U && dst[n - 2] == '\\' && /* Ends in "\." */
+ (n < 3U || dst[n - 3] != '\\')) /* But not "\\." */
break;
else
dst[--n] = '\0';
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: res_data.c,v 1.2 2004/03/09 06:30:17 marka Exp $";
+static const char rcsid[] = "$Id: res_data.c,v 1.3 2004/03/18 02:58:01 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
void
fp_nquery(const u_char *msg, int len, FILE *file) {
- if ((_res.options & RES_INIT) == 0 && res_init() == -1)
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1)
return;
res_pquery(&_res, msg, len, file);
u_char *buf, /* buffer to put query */
int buflen) /* size of buffer */
{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (-1);
}
int
res_mkupdate(ns_updrec *rrecp_in, u_char *buf, int buflen) {
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (-1);
}
u_char *answer, /* buffer to put answer */
int anslen) /* size of answer buffer */
{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (-1);
}
int
res_send(const u_char *buf, int buflen, u_char *ans, int anssiz) {
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
/* errno should have been set by res_init() in this case. */
return (-1);
}
res_sendsigned(const u_char *buf, int buflen, ns_tsig_key *key,
u_char *ans, int anssiz)
{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
/* errno should have been set by res_init() in this case. */
return (-1);
}
int
res_update(ns_updrec *rrecp_in) {
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (-1);
}
u_char *answer, /* buffer to put answer */
int anslen) /* size of answer */
{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (-1);
}
u_char *answer, /* buffer to put answer */
int anslen) /* size of answer */
{
- if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
+ if ((_res.options & RES_INIT) == 0U && res_init() == -1) {
RES_SET_H_ERRNO(&_res, NETDB_INTERNAL);
return (-1);
}
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_debug.c,v 1.9 2004/03/09 06:30:17 marka Exp $";
+static const char rcsid[] = "$Id: res_debug.c,v 1.10 2004/03/18 02:58:01 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
u_long mask;
fprintf(file, ";; res options:");
- for (mask = 1; mask != 0; mask <<= 1)
+ for (mask = 1; mask != 0U; mask <<= 1)
if (statp->options & mask)
fprintf(file, " %s", p_option(mask));
putc('\n', file);
sprintf(ret, "[af%d]", u.sin.sin_family);
break;
}
- if (size > 0) {
+ if (size > 0U) {
strncpy(buf, ret, size - 1);
buf[size - 1] = '0';
}
goto done;
errno = 0;
result = strtoul(buf + 5, &endptr, 10);
- if (errno == 0 && *endptr == '\0' && result <= 0xffff)
+ if (errno == 0 && *endptr == '\0' && result <= 0xffffU)
success = 1;
done:
if (successp)
goto done;
errno = 0;
result = strtoul(buf + 4, &endptr, 10);
- if (errno == 0 && *endptr == '\0' && result <= 0xffff)
+ if (errno == 0 && *endptr == '\0' && result <= 0xffffU)
success = 1;
done:
if (successp)
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_findzonecut.c,v 1.6 2004/03/09 06:30:17 marka Exp $";
+static const char rcsid[] = "$Id: res_findzonecut.c,v 1.7 2004/03/18 02:58:01 marka Exp $";
#endif /* not lint */
/*
#define DPRINTF(x) do {\
int save_errno = errno; \
- if ((statp->options & RES_DEBUG) != 0) res_dprintf x; \
+ if ((statp->options & RES_DEBUG) != 0U) res_dprintf x; \
errno = save_errno; \
} while (0)
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
-static const char rcsid[] = "$Id: res_init.c,v 1.15 2004/03/09 06:30:17 marka Exp $";
+static const char rcsid[] = "$Id: res_init.c,v 1.16 2004/03/18 02:58:02 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
statp->id = res_randomid();
}
- if ((statp->options & RES_INIT) != 0)
+ if ((statp->options & RES_INIT) != 0U)
res_ndestroy(statp);
memset(u, 0, sizeof(u));
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_mkquery.c,v 1.4 2004/03/09 06:30:17 marka Exp $";
+static const char rcsid[] = "$Id: res_mkquery.c,v 1.5 2004/03/18 02:58:02 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
hp = (HEADER *) buf;
hp->id = htons(++statp->id);
hp->opcode = op;
- hp->rd = (statp->options & RES_RECURSE) != 0;
+ hp->rd = (statp->options & RES_RECURSE) != 0U;
hp->rcode = NOERROR;
cp = buf + HFIXEDSZ;
ep = buf + buflen;
u_int16_t flags = 0;
#ifdef DEBUG
- if ((statp->options & RES_DEBUG) != 0)
+ if ((statp->options & RES_DEBUG) != 0U)
printf(";; res_nopt()\n");
#endif
*/
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_mkupdate.c,v 1.3 2004/03/09 06:30:18 marka Exp $";
+static const char rcsid[] = "$Id: res_mkupdate.c,v 1.4 2004/03/18 02:58:02 marka Exp $";
#endif /* not lint */
#include "port_before.h"
}
break;
case T_TXT:
- while (1) {
+ for (;;) {
if ((n = getstr_str(buf2, sizeof buf2,
&startp, endp)) < 0) {
if (cp != (sp2 + INT16SZ))
ShrinkBuffer(n);
maxtype = 0;
memset(data, 0, sizeof data);
- while (1) {
+ for (;;) {
if (!getword_str(buf2, sizeof buf2, &startp,
endp))
break;
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_query.c,v 1.6 2004/03/09 06:30:18 marka Exp $";
+static const char rcsid[] = "$Id: res_query.c,v 1.7 2004/03/18 02:58:02 marka Exp $";
#endif /* LIBC_SCCS and not lint */
#include "port_before.h"
buf, sizeof(buf));
#ifdef RES_USE_EDNS0
if (n > 0 && (statp->_flags & RES_F_EDNS0ERR) == 0 &&
- (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0)
+ (statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U)
n = res_nopt(statp, n, buf, sizeof(buf), anslen);
#endif
if (n <= 0) {
if (n < 0) {
#ifdef RES_USE_EDNS0
/* if the query choked with EDNS0, retry without EDNS0 */
- if ((statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0 &&
+ if ((statp->options & (RES_USE_EDNS0|RES_USE_DNSSEC)) != 0U &&
((oflags ^ statp->_flags) & RES_F_EDNS0ERR) != 0) {
statp->_flags |= RES_F_EDNS0ERR;
if (statp->options & RES_DEBUG)
* - there is at least one dot, there is no trailing dot,
* and RES_DNSRCH is set.
*/
- if ((!dots && (statp->options & RES_DEFNAMES) != 0) ||
- (dots && !trailing_dot && (statp->options & RES_DNSRCH) != 0)) {
+ if ((!dots && (statp->options & RES_DEFNAMES) != 0U) ||
+ (dots && !trailing_dot && (statp->options & RES_DNSRCH) != 0U)) {
int done = 0;
for (domain = (const char * const *)statp->dnsrch;
/* if we got here for some reason other than DNSRCH,
* we only wanted one iteration of the loop, so stop.
*/
- if ((statp->options & RES_DNSRCH) == 0)
+ if ((statp->options & RES_DNSRCH) == 0U)
done++;
}
}
* If the query has not already been tried as is then try it
* unless RES_NOTLDQUERY is set and there were no dots.
*/
- if ((dots || !searched || (statp->options & RES_NOTLDQUERY) == 0) &&
+ if ((dots || !searched || (statp->options & RES_NOTLDQUERY) == 0U) &&
!(tried_as_is || root_on_list)) {
ret = res_nquerydomain(statp, name, NULL, class, type,
answer, anslen);
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
-static const char rcsid[] = "$Id: res_send.c,v 1.8 2004/03/09 06:30:18 marka Exp $";
+static const char rcsid[] = "$Id: res_send.c,v 1.9 2004/03/18 02:58:02 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/*
* Some resolvers want to even out the load on their nameservers.
* Note that RES_BLAST overrides RES_ROTATE.
*/
- if ((statp->options & RES_ROTATE) != 0 &&
- (statp->options & RES_BLAST) == 0) {
+ if ((statp->options & RES_ROTATE) != 0U &&
+ (statp->options & RES_BLAST) == 0U) {
union res_sockaddr_union inu;
struct sockaddr_in ina;
int lastns = statp->nscount - 1;
* or if we haven't been asked to keep a socket open,
* close the socket.
*/
- if ((v_circuit && (statp->options & RES_USEVC) == 0) ||
- (statp->options & RES_STAYOPEN) == 0) {
+ if ((v_circuit && (statp->options & RES_USEVC) == 0U) ||
+ (statp->options & RES_STAYOPEN) == 0U) {
res_nclose(statp);
}
if (statp->rhook) {
goto wait;
}
#ifdef RES_USE_EDNS0
- if (anhp->rcode == FORMERR && (statp->options & RES_USE_EDNS0) != 0) {
+ if (anhp->rcode == FORMERR && (statp->options & RES_USE_EDNS0) != 0U) {
/*
* Do not retry if the server do not understand EDNS0.
* The case has to be captured here, as FORMERR packet do not
alen = alen;
- if ((statp->options & RES_DEBUG) != 0) {
+ if ((statp->options & RES_DEBUG) != 0U) {
if (getnameinfo(address, alen, hbuf, sizeof(hbuf),
sbuf, sizeof(sbuf), niflags)) {
strncpy(hbuf, "?", sizeof(hbuf) - 1);
Perror(const res_state statp, FILE *file, const char *string, int error) {
int save = errno;
- if ((statp->options & RES_DEBUG) != 0)
+ if ((statp->options & RES_DEBUG) != 0U)
fprintf(file, "res_send: %s: %s\n",
string, strerror(error));
errno = save;
}
hp = (HEADER *) answer;
- if (hp->tc && !usingTCP && (statp->options & RES_IGNTC) == 0) {
+ if (hp->tc && !usingTCP && (statp->options & RES_IGNTC) == 0U) {
nstatp->options &= ~RES_IGNTC;
usingTCP = 1;
goto retry;
#if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: res_update.c,v 1.11 2004/03/09 06:30:18 marka Exp $";
+static const char rcsid[] = "$Id: res_update.c,v 1.12 2004/03/18 02:58:02 marka Exp $";
#endif /* not lint */
/*
#define DPRINTF(x) do {\
int save_errno = errno; \
- if ((statp->options & RES_DEBUG) != 0) res_dprintf x; \
+ if ((statp->options & RES_DEBUG) != 0U) res_dprintf x; \
errno = save_errno; \
} while (0)
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.h,v 1.106 2004/03/05 05:09:44 marka Exp $ */
+/* $Id: name.h,v 1.107 2004/03/18 02:58:03 marka Exp $ */
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
#define DNS_NAME_SPLIT(n, l, p, s) \
do { \
- if ((p) != NULL) \
- dns_name_getlabelsequence((n), 0, (n)->labels - (l), (p)); \
- if ((s) != NULL) \
- dns_name_getlabelsequence((n), (n)->labels - (l), (l), (s)); \
+ dns_name_t *_n = (n); \
+ dns_name_t *_p = (p); \
+ dns_name_t *_s = (s); \
+ unsigned int _l = (l); \
+ if (_p != NULL) \
+ dns_name_getlabelsequence(_n, 0, _n->labels - _l, _p); \
+ if (_s != NULL) \
+ dns_name_getlabelsequence(_n, _n->labels - _l, _l, _s); \
} while (0);
#ifdef DNS_NAME_USEINLINE
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: portlist.c,v 1.5 2004/03/05 05:09:22 marka Exp $ */
+/* $Id: portlist.c,v 1.6 2004/03/18 02:58:03 marka Exp $ */
#include <stdlib.h>
unsigned int max = len - 1;
unsigned int last = len;
- while (1) {
+ for (;;) {
if (list[xtry].port == port)
return (&list[xtry]);
if (port > list[xtry].port) {
if (xtry == max)
- return (NULL);
+ break;
min = xtry;
xtry = xtry + (max - xtry + 1) / 2;
INSIST(xtry <= max);
if (xtry == last)
- return (NULL);
+ break;
last = min;
} else {
if (xtry == min)
- return (NULL);
+ break;
max = xtry;
xtry = xtry - (xtry - min + 1) / 2;
INSIST(xtry >= min);
if (xtry == last)
- return (NULL);
+ break;
last = max;
}
}
+ return (NULL);
}
isc_result_t
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dlv_65323.c,v 1.3 2004/03/16 05:22:30 marka Exp $ */
+/* $Id: dlv_65323.c,v 1.4 2004/03/18 02:58:04 marka Exp $ */
/* draft-ietf-dnsext-delegation-signer-05.txt */
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xff)
+ if (token.value.as_ulong > 0xffU)
RETTOK(ISC_R_RANGE);
RETERR(uint8_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xff)
+ if (token.value.as_ulong > 0xffU)
RETTOK(ISC_R_RANGE);
RETERR(uint8_tobuffer(token.value.as_ulong, target));
type = (isc_uint16_t) token.value.as_ulong;
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds_43.c,v 1.6 2004/03/05 05:10:11 marka Exp $ */
+/* $Id: ds_43.c,v 1.7 2004/03/18 02:58:04 marka Exp $ */
/* draft-ietf-dnsext-delegation-signer-05.txt */
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xff)
+ if (token.value.as_ulong > 0xffU)
RETTOK(ISC_R_RANGE);
RETERR(uint8_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xff)
+ if (token.value.as_ulong > 0xffU)
RETTOK(ISC_R_RANGE);
RETERR(uint8_tobuffer(token.value.as_ulong, target));
type = (isc_uint16_t) token.value.as_ulong;
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rrsig_46.c,v 1.4 2004/03/05 05:10:17 marka Exp $ */
+/* $Id: rrsig_46.c,v 1.5 2004/03/18 02:58:04 marka Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xff)
+ if (token.value.as_ulong > 0xffU)
RETTOK(ISC_R_RANGE);
c = (unsigned char)token.value.as_ulong;
RETERR(mem_tobuffer(target, &c, 1));
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: apl_42.c,v 1.7 2004/03/05 05:10:24 marka Exp $ */
+/* $Id: apl_42.c,v 1.8 2004/03/18 02:58:04 marka Exp $ */
/* RFC 3123 */
afi = strtoul(cp, &ap, 10);
if (*ap++ != ':' || cp == ap)
RETTOK(DNS_R_SYNTAX);
- if (afi > 0xffff)
+ if (afi > 0xffffU)
RETTOK(ISC_R_RANGE);
slash = strchr(ap, '/');
if (slash == NULL || slash == ap)
/*
* Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.113 2004/03/10 02:19:58 marka Exp $
+ * $Id: dst_api.c,v 1.114 2004/03/18 02:58:05 marka Exp $
*/
#include <config.h>
return (DST_R_UNSUPPORTEDALG);
}
-isc_result_t
+static isc_result_t
addsuffix(char *filename, unsigned int len, const char *ofilename,
const char *suffix)
{
/*
* Principal Author: Brian Wellington
- * $Id: dst_parse.c,v 1.40 2004/03/05 05:48:24 marka Exp $
+ * $Id: dst_parse.c,v 1.41 2004/03/18 02:58:05 marka Exp $
*/
#include <config.h>
fprintf(fp, "(HMAC_MD5)\n");
break;
default:
- fprintf(fp, "(?)\n"); break;
+ fprintf(fp, "(?)\n");
break;
}
/*
* Principal Author: Brian Wellington
- * $Id: openssl_link.c,v 1.56 2004/03/05 05:48:24 marka Exp $
+ * $Id: openssl_link.c,v 1.57 2004/03/18 02:58:05 marka Exp $
*/
#ifdef OPENSSL
INSIST(dst__memory_pool != NULL);
p = NULL;
- if (size > 0) {
+ if (size > 0U) {
p = mem_alloc(size);
if (p != NULL && ptr != NULL)
memcpy(p, ptr, size);
/*
* Principal Author: Brian Wellington
- * $Id: openssldh_link.c,v 1.52 2004/03/05 05:48:24 marka Exp $
+ * $Id: openssldh_link.c,v 1.53 2004/03/18 02:58:05 marka Exp $
*/
#ifdef OPENSSL
unsigned int i;
BIGNUM *out;
- RUNTIME_CHECK(strlen(str) < 1024 && strlen(str) % 2 == 0);
+ RUNTIME_CHECK(strlen(str) < 1024U && strlen(str) % 2 == 0U);
for (i = 0; i < strlen(str); i += 2) {
char *s;
unsigned int high, low;
/*
* Principal Author: Brian Wellington
- * $Id: opensslrsa_link.c,v 1.28 2004/03/05 05:10:31 marka Exp $
+ * $Id: opensslrsa_link.c,v 1.29 2004/03/18 02:58:05 marka Exp $
*/
#ifdef OPENSSL
status = RSA_sign(type, digest, digestlen, r.base, &siglen, rsa);
if (status == 0) {
err = ERR_peek_error_line(&file, &line);
- if (err != 0) {
+ if (err != 0U) {
message = ERR_error_string(err, NULL);
fprintf(stderr, "%s:%s:%d\n", message,
file ? file : "", line);
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: zone.c,v 1.409 2004/03/05 05:09:26 marka Exp $ */
+/* $Id: zone.c,v 1.410 2004/03/18 02:58:03 marka Exp $ */
#include <config.h>
char namebuf[DNS_NAME_FORMATSIZE];
char namebuf2[DNS_NAME_FORMATSIZE];
char typebuf[DNS_RDATATYPE_FORMATSIZE];
- unsigned int level = ISC_LOG_WARNING;
+ int level = ISC_LOG_WARNING;
dns_name_t bad;
REQUIRE(DNS_ZONE_VALID(zone));
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: mem.c,v 1.115 2004/03/05 05:10:46 marka Exp $ */
+/* $Id: mem.c,v 1.116 2004/03/18 02:58:06 marka Exp $ */
#include <config.h>
if (ctx->checkfree) {
for (i = 0; i <= ctx->max_size; i++) {
#if ISC_MEM_TRACKLINES
- if (ctx->stats[i].gets != 0)
+ if (ctx->stats[i].gets != 0U)
print_active(ctx, stderr);
#endif
INSIST(ctx->stats[i].gets == 0U);
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: string.c,v 1.9 2004/03/05 05:10:49 marka Exp $ */
+/* $Id: string.c,v 1.10 2004/03/18 02:58:06 marka Exp $ */
#include <config.h>
size_t n = size;
/* Copy as many bytes as will fit */
- if (n != 0 && --n != 0) {
+ if (n != 0U && --n != 0U) {
do {
if ((*d++ = *s++) == 0)
break;
- } while (--n != 0);
+ } while (--n != 0U);
}
/* Not enough room in dst, add NUL and traverse rest of src */
- if (n == 0) {
- if (size != 0)
+ if (n == 0U) {
+ if (size != 0U)
*d = '\0'; /* NUL-terminate dst */
while (*s++)
;
size_t dlen;
/* Find the end of dst and adjust bytes left but don't go past end */
- while (n-- != 0 && *d != '\0')
+ while (n-- != 0U && *d != '\0')
d++;
dlen = d - dst;
n = size - dlen;
- if (n == 0)
+ if (n == 0U)
return(dlen + strlen(s));
while (*s != '\0') {
- if (n != 1) {
+ if (n != 1U) {
*d++ = *s;
n--;
}
* SUCH DAMAGE.
*/
-/* $Id: file.c,v 1.46 2004/03/05 05:11:44 marka Exp $ */
+/* $Id: file.c,v 1.47 2004/03/18 02:58:06 marka Exp $ */
#include <config.h>
isc_result_t result = ISC_R_SUCCESS;
REQUIRE(dirname != NULL);
- REQUIRE(length > 0);
+ REQUIRE(length > 0U);
cwd = getcwd(dirname, length);
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.236 2004/03/05 05:11:46 marka Exp $ */
+/* $Id: socket.c,v 1.237 2004/03/18 02:58:07 marka Exp $ */
#include <config.h>
cmsgp = CMSG_NXTHDR(&msg, cmsgp);
if (cmsgp != NULL)
- return ((void *)cmsgp - (void *)msg.msg_control);
+ return ((char *)cmsgp - (char *)msg.msg_control);
else
return (0);
#endif
#ifndef USE_CMSG
return;
#else
- if (msg->msg_controllen == 0 || msg->msg_control == NULL)
+ if (msg->msg_controllen == 0U || msg->msg_control == NULL)
return;
#ifdef SO_TIMESTAMP
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: parser.c,v 1.111 2004/03/05 05:12:22 marka Exp $ */
+/* $Id: parser.c,v 1.112 2004/03/18 02:58:07 marka Exp $ */
#include <config.h>
}
}
if ((flags & CFG_ADDR_V4PREFIXOK) != 0 &&
- strlen(s) <= 15) {
+ strlen(s) <= 15U) {
char buf[64];
int i;
}
}
if ((flags & CFG_ADDR_V6OK) != 0 &&
- strlen(s) <= 127) {
+ strlen(s) <= 127U) {
char buf[128];
char *d; /* zone delimiter */
isc_uint32_t zone = 0; /* scope zone ID */
"expected port number or '*'");
return (ISC_R_UNEXPECTEDTOKEN);
}
- if (pctx->token.value.as_ulong >= 65536) {
+ if (pctx->token.value.as_ulong >= 65536U) {
cfg_parser_error(pctx, CFG_LOG_NEAR,
"port number out of range");
return (ISC_R_UNEXPECTEDTOKEN);
./lib/bind/port/irix/Makefile.in MAKE 2001,2004
./lib/bind/port/irix/include/.cvsignore X 2001
./lib/bind/port/irix/include/Makefile.in MAKE 2001,2004
-./lib/bind/port/irix/include/paths.h C 2001,2004
+./lib/bind/port/irix/include/paths.h X 2001
./lib/bind/port/irix/include/sys/bitypes.h X 2001
./lib/bind/port/irix/include/sys/cdefs.h X 2001
./lib/bind/port/linux/.cvsignore X 2001
./lib/dns/rbtdb.h C 1999,2000,2001,2004
./lib/dns/rbtdb64.c C 1999,2000,2001,2004
./lib/dns/rbtdb64.h C 1999,2000,2001,2004
-./lib/dns/rcode.c C 2004
+./lib/dns/rcode.c C 1998,1999,2000,2001,2002,2003,2004
./lib/dns/rdata.c C 1998,1999,2000,2001,2002,2003,2004
./lib/dns/rdata/any_255/tsig_250.c C 1999,2000,2001,2002,2003,2004
./lib/dns/rdata/any_255/tsig_250.h C 1999,2000,2001,2004
Copyright (C) 2001, 2002 Internet Software Consortium.
See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
-$Id: win32-build.txt,v 1.7 2004/03/05 05:14:21 marka Exp $
+$Id: win32-build.txt,v 1.8 2004/03/18 02:58:08 marka Exp $
- BIND 9.3.0 Beta for Win32 Source Build Instructions. 28-Jul-2001
+ BIND 9.4 for Win32 Source Build Instructions. 28-Jul-2001
-Building BIND 9.3.x on Windows NT/2000 has two prerequisites:
+Building BIND 9.4 on Windows NT/2000 has two prerequisites:
1) You need to install Perl for Windows NT/2000. ActiveState
(http://www.activestate.com/) is the one most people install and use;
2) OpenSSL (http://www.openssl.org) needs to be downloaded and built