pullup silence compiler fixes

ifconfig.sh for Solaris 9
README updates
This commit is contained in:
Mark Andrews 2004-03-18 02:58:08 +00:00
parent ca9a8f6d0b
commit 1676408640
71 changed files with 314 additions and 261 deletions

23
README
View file

@ -48,12 +48,35 @@ BIND 9.3.0
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

View file

@ -15,7 +15,7 @@
# 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.
@ -72,9 +72,9 @@ case "$1" in
*-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

View file

@ -2,7 +2,7 @@ Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
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
@ -136,7 +136,7 @@ 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

View file

@ -73,7 +73,7 @@ typedef struct dst_key {
#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 {

View file

@ -99,7 +99,7 @@ unsigned long len;
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
@ -115,7 +115,7 @@ unsigned long len;
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);
@ -136,7 +136,7 @@ unsigned long len;
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);
@ -163,7 +163,7 @@ unsigned long 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);

View file

@ -101,9 +101,9 @@
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; \
} \
}

View file

@ -70,7 +70,7 @@
#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"
@ -156,7 +156,7 @@ inet_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++ = val;
c = *++cp;
@ -183,19 +183,19 @@ inet_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;

View file

@ -16,7 +16,7 @@
*/
#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"
@ -121,7 +121,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
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;
@ -130,7 +130,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
if (len > bytes)
bytes = len;
b = decoct(src, bytes, dst, size);
if (b == 0)
if (b == 0U)
goto emsgsize;
dst += b;
size -= b;

View file

@ -16,7 +16,7 @@
*/
#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"
@ -98,7 +98,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
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 == '/')
@ -133,7 +133,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
goto enoent;
/* Extend address to four octets. */
while (size-- > 0)
while (size-- > 0U)
*dst++ = 0;
*pbits = bits;

View file

@ -53,9 +53,9 @@ inet_makeaddr(net, host)
{
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);

View file

@ -16,7 +16,7 @@
*/
#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"
@ -70,7 +70,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
&& 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. */
@ -84,14 +84,14 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
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);
}
@ -108,7 +108,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
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 == '/')
@ -171,7 +171,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
}
/* Extend network to cover the actual mask. */
while (bits > ((dst - odst) * 8)) {
if (size-- <= 0)
if (size-- <= 0U)
goto emsgsize;
*dst++ = '\0';
}

View file

@ -66,14 +66,14 @@ again:
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++;
@ -85,7 +85,7 @@ again:
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;
@ -94,7 +94,7 @@ 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;

View file

@ -16,7 +16,7 @@
*/
#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
/*
@ -118,7 +118,7 @@ dns_res_get(struct irs_acc *this) {
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);

View file

@ -52,7 +52,7 @@
/* 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. */
@ -386,7 +386,7 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
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;
@ -838,7 +838,7 @@ gethostans(struct irs_ho *this,
}
cp += n;
#ifdef RES_USE_DNAME
if ((pvt->res->options & RES_USE_DNAME) != 0)
if ((pvt->res->options & RES_USE_DNAME) != 0U)
#endif
{
/*
@ -1149,7 +1149,7 @@ init(struct irs_ho *this) {
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);

View file

@ -16,7 +16,7 @@
*/
#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. */
@ -587,7 +587,7 @@ init(struct irs_nw *this) {
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);

View file

@ -16,13 +16,13 @@
*/
/*
* $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)

View file

@ -16,7 +16,7 @@
*/
#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
/*
@ -175,7 +175,7 @@ gen_res_get(struct irs_acc *this) {
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);

View file

@ -16,7 +16,7 @@
*/
#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 */
@ -383,7 +383,7 @@ init(struct irs_ho *this) {
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);

View file

@ -16,7 +16,7 @@
*/
#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 */
@ -255,7 +255,7 @@ init(struct irs_nw *this) {
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);

View file

@ -16,7 +16,7 @@
*/
#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 */
@ -187,7 +187,7 @@ gethostent_p(struct net_data *net_data) {
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);
@ -356,13 +356,13 @@ getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
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);
}
@ -1007,7 +1007,7 @@ fakeaddr(const char *name, int af, struct net_data *net_data) {
}
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;
}

View file

@ -132,7 +132,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
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.
@ -177,7 +177,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
}
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.
@ -283,7 +283,7 @@ ip6_sa2str(const struct sockaddr_in6 *sa6, char *buf,
#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';
}
@ -313,7 +313,7 @@ ip6_sa2str(const struct sockaddr_in6 *sa6, char *buf,
/* last resort */
sprintf(tmp, "%u", sa6->sin6_scope_id);
if (bufsiz != 0) {
if (bufsiz != 0U) {
strncpy(buf, tmp, bufsiz - 1);
buf[bufsiz - 1] = '\0';
}

View file

@ -16,7 +16,7 @@
*/
#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 */
@ -156,13 +156,13 @@ getnetbyaddr_p(unsigned long net, int type, struct net_data *net_data) {
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

View file

@ -1,5 +1,5 @@
#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
/*
@ -516,7 +516,7 @@ init(struct hesiod_p *ctx) {
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);

View file

@ -16,7 +16,7 @@
*/
#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 */
@ -387,7 +387,7 @@ irs_irp_read_response(struct irp_p *pvt, char *text, size_t textlen) {
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++;

View file

@ -49,7 +49,7 @@
*/
#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
@ -508,7 +508,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
/* 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;
}
@ -523,7 +523,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
/* 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);
@ -679,7 +679,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
/* 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;
}
@ -700,7 +700,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
/* 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);
@ -837,7 +837,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
/* 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;
}
@ -858,7 +858,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
/* 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);
@ -1040,7 +1040,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
/* 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;
}
@ -1061,7 +1061,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
/* 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)
@ -1075,7 +1075,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
/* 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);
@ -1428,7 +1428,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
/* 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;
}
@ -1449,7 +1449,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
/* 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)
@ -1463,7 +1463,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
/* n_net field */
tb = tmpbuf;
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
strlen(tb) == 0) {
strlen(tb) == 0U) {
goto error;
}
nnet = 0;
@ -1605,7 +1605,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
/* 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;
}
@ -1626,7 +1626,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
/* 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)
@ -1640,7 +1640,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
/* 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);
@ -1961,12 +1961,12 @@ strcmp_nws(const char *a, const char *b) {
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++;

View file

@ -16,7 +16,7 @@
*/
#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"
@ -169,7 +169,7 @@ net_data_create(const char *conf_file) {
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));

View file

@ -16,7 +16,7 @@
*/
#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 */
@ -106,7 +106,7 @@ lcl_res_get(struct irs_acc *this) {
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);

View file

@ -52,7 +52,7 @@
/* 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. */
@ -569,7 +569,7 @@ init(struct irs_ho *this) {
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);

View file

@ -49,7 +49,7 @@
*/
#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 */
@ -364,7 +364,7 @@ init(struct irs_nw *this) {
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);

View file

@ -41,7 +41,7 @@
*/
#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"
@ -138,7 +138,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
u_char output[4];
size_t i;
while (2 < srclength) {
while (2U < srclength) {
input[0] = *src++;
input[1] = *src++;
input[2] = *src++;
@ -162,7 +162,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
}
/* 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++)
@ -179,7 +179,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
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]];

View file

@ -1,5 +1,5 @@
#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 */
/*
@ -234,7 +234,7 @@ ctl_command(struct ctl_cctx *ctx, const char *cmd, size_t len,
default:
abort();
}
if (len >= MAX_LINELEN) {
if (len >= (size_t)MAX_LINELEN) {
errno = EMSGSIZE;
return (-1);
}
@ -528,7 +528,7 @@ readable(evContext ev, void *uap, int fd, int evmask) {
(*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);
@ -543,7 +543,7 @@ readable(evContext ev, void *uap, int fd, int evmask) {
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);

View file

@ -1,5 +1,5 @@
#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 */
/*
@ -78,7 +78,7 @@ int
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));

View file

@ -1,5 +1,5 @@
#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 */
/*
@ -321,7 +321,7 @@ ctl_response(struct ctl_sess *sess, u_int code, const char *text,
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;
@ -604,13 +604,13 @@ ctl_readable(evContext lev, void *uap, int fd, int evmask) {
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);

View file

@ -20,7 +20,7 @@
*/
#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"
@ -221,7 +221,7 @@ copyvec(evStream *str, const struct iovec *iov, int iocnt) {
/* 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 *)

View file

@ -20,7 +20,7 @@
*/
#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. */
@ -180,14 +180,25 @@ evSetTimer(evContext opaqueCtx,
(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. */
@ -254,6 +265,8 @@ evConfigTimer(evContext opaqueCtx,
evTimer *timer = id.opaque;
int result=0;
UNUSED(value);
if (heap_element(ctx->timers, timer->index) != timer)
EV_ERR(ENOENT);
@ -283,11 +296,22 @@ evResetTimer(evContext opaqueCtx,
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;

View file

@ -20,7 +20,7 @@
*/
#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"
@ -590,7 +590,8 @@ evDrop(evContext opaqueCtx, evEvent opaqueEv) {
* 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 {

View file

@ -63,7 +63,7 @@ isc_gethexstring(unsigned char *buf, size_t len, int count, FILE *fp,
goto formerr;
x = (x<<4) | (s - hex);
if (++n == 2) {
if (len > 0) {
if (len > 0U) {
*buf++ = x;
len--;
} else
@ -86,11 +86,11 @@ isc_puthexstring(FILE *fp, const unsigned char *buf, size_t buflen,
{
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;
@ -106,7 +106,7 @@ isc_puthexstring(FILE *fp, const unsigned char *buf, size_t buflen,
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++;

View file

@ -16,7 +16,7 @@
*/
#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"
@ -75,7 +75,7 @@ version_rename(log_channel chan) {
/*
* 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);
@ -364,7 +364,7 @@ log_vwrite(log_context lc, int category, int level, const char *format,
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);

View file

@ -24,7 +24,7 @@
#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"
@ -124,11 +124,11 @@ meminit(size_t init_max_size, size_t target_size) {
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;
@ -180,7 +180,7 @@ __memget_record(size_t size, const char *file, int line) {
if (freelists == NULL)
if (meminit(0, 0) == -1)
return (NULL);
if (size == 0) {
if (size == 0U) {
errno = EINVAL;
return (NULL);
}
@ -354,7 +354,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
REQUIRE(freelists != NULL);
if (size == 0) {
if (size == 0U) {
errno = EINVAL;
return;
}
@ -396,7 +396,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
free(mem);
#endif
INSIST(stats[max_size].gets != 0);
INSIST(stats[max_size].gets != 0U);
stats[max_size].gets--;
return;
}
@ -433,7 +433,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
* 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++;
}
@ -469,12 +469,12 @@ memstats(FILE *out) {
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);
@ -501,7 +501,7 @@ memactive(void) {
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);
}

View file

@ -16,7 +16,7 @@
*/
#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. */
@ -57,7 +57,7 @@ ns_datetosecs(const char *cp, int *errp) {
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);
}

View file

@ -16,7 +16,7 @@
*/
#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. */
@ -145,7 +145,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
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));
@ -154,7 +154,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
*/
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);
@ -258,7 +258,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
case ns_t_rt: {
u_int t;
if (rdlen < NS_INT16SZ)
if (rdlen < (size_t)NS_INT16SZ)
goto formerr;
/* Priority. */
@ -276,7 +276,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
case ns_t_px: {
u_int t;
if (rdlen < NS_INT16SZ)
if (rdlen < (size_t)NS_INT16SZ)
goto formerr;
/* Priority. */
@ -322,7 +322,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
}
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);
@ -341,7 +341,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
u_int order, preference;
char t[50];
if (rdlen < 2*NS_INT16SZ)
if (rdlen < 2U*NS_INT16SZ)
goto formerr;
/* Order, Precedence. */
@ -382,7 +382,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
u_int priority, weight, port;
char t[50];
if (rdlen < NS_INT16SZ*3)
if (rdlen < 3U*NS_INT16SZ)
goto formerr;
/* Priority, Weight, Port. */
@ -411,7 +411,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
case ns_t_wks: {
int n, lcnt;
if (rdlen < NS_INT32SZ + 1)
if (rdlen < 1U + NS_INT32SZ)
goto formerr;
/* Address. */
@ -455,7 +455,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
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. */
@ -498,7 +498,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
u_long t;
int n;
if (rdlen < 22)
if (rdlen < 22U)
goto formerr;
/* Type covered, Algorithm, Label count, Original TTL. */
@ -662,7 +662,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
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;
@ -829,7 +829,7 @@ addname(const u_char *msg, size_t msglen,
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". */

View file

@ -16,7 +16,7 @@
*/
#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"
@ -56,7 +56,7 @@ ns_samedomain(const char *a, const char *b) {
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--)
@ -72,7 +72,7 @@ ns_samedomain(const char *a, const char *b) {
}
/* 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--)
@ -88,7 +88,7 @@ ns_samedomain(const char *a, const char *b) {
}
/* 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'. */
@ -171,9 +171,9 @@ ns_makecanon(const char *src, char *dst, size_t dstsize) {
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';

View file

@ -16,7 +16,7 @@
*/
#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"
@ -133,7 +133,7 @@ fp_query(const u_char *msg, FILE *file) {
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);
@ -149,7 +149,7 @@ res_mkquery(int op, /* opcode of query */
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);
}
@ -160,7 +160,7 @@ res_mkquery(int op, /* opcode of query */
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);
}
@ -174,7 +174,7 @@ res_query(const char *name, /* domain name */
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);
}
@ -198,7 +198,7 @@ res_isourserver(const struct sockaddr_in *inp) {
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);
}
@ -210,7 +210,7 @@ int
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);
}
@ -225,7 +225,7 @@ res_close(void) {
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);
}
@ -239,7 +239,7 @@ res_search(const char *name, /* domain name */
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);
}
@ -254,7 +254,7 @@ res_querydomain(const char *name,
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);
}

View file

@ -95,7 +95,7 @@
#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"
@ -137,7 +137,7 @@ fp_resstat(const res_state statp, FILE *file) {
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);
@ -672,7 +672,7 @@ p_sockun(union res_sockaddr_union u, char *buf, size_t size) {
sprintf(ret, "[af%d]", u.sin.sin_family);
break;
}
if (size > 0) {
if (size > 0U) {
strncpy(buf, ret, size - 1);
buf[size - 1] = '0';
}
@ -1128,7 +1128,7 @@ res_nametoclass(const char *buf, int *successp) {
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)
@ -1151,7 +1151,7 @@ res_nametotype(const char *buf, int *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)

View file

@ -1,5 +1,5 @@
#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 */
/*
@ -90,7 +90,7 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
#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)

View file

@ -70,7 +70,7 @@
#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"
@ -170,7 +170,7 @@ __res_vinit(res_state statp, int preinit) {
statp->id = res_randomid();
}
if ((statp->options & RES_INIT) != 0)
if ((statp->options & RES_INIT) != 0U)
res_ndestroy(statp);
memset(u, 0, sizeof(u));

View file

@ -70,7 +70,7 @@
#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"
@ -125,7 +125,7 @@ res_nmkquery(res_state statp,
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;
@ -219,7 +219,7 @@ res_nopt(res_state statp,
u_int16_t flags = 0;
#ifdef DEBUG
if ((statp->options & RES_DEBUG) != 0)
if ((statp->options & RES_DEBUG) != 0U)
printf(";; res_nopt()\n");
#endif

View file

@ -21,7 +21,7 @@
*/
#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"
@ -380,7 +380,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) {
}
break;
case T_TXT:
while (1) {
for (;;) {
if ((n = getstr_str(buf2, sizeof buf2,
&startp, endp)) < 0) {
if (cp != (sp2 + INT16SZ))
@ -582,7 +582,7 @@ res_nmkupdate(res_state statp, ns_updrec *rrecp_in, u_char *buf, int buflen) {
ShrinkBuffer(n);
maxtype = 0;
memset(data, 0, sizeof data);
while (1) {
for (;;) {
if (!getword_str(buf2, sizeof buf2, &startp,
endp))
break;

View file

@ -70,7 +70,7 @@
#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"
@ -133,7 +133,7 @@ again:
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) {
@ -148,7 +148,7 @@ again:
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)
@ -252,8 +252,8 @@ res_nsearch(res_state statp,
* - 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;
@ -311,7 +311,7 @@ res_nsearch(res_state statp,
/* 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++;
}
}
@ -320,7 +320,7 @@ res_nsearch(res_state statp,
* 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);

View file

@ -70,7 +70,7 @@
#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 */
/*
@ -352,8 +352,8 @@ res_nsend(res_state statp,
* 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;
@ -467,8 +467,8 @@ res_nsend(res_state statp,
* 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) {
@ -902,7 +902,7 @@ send_dg(res_state statp,
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
@ -970,7 +970,7 @@ Aerror(const res_state statp, FILE *file, const char *string, int error,
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);
@ -988,7 +988,7 @@ static void
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;

View file

@ -135,7 +135,7 @@ retry:
}
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;

View file

@ -1,5 +1,5 @@
#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 */
/*
@ -83,7 +83,7 @@ static void res_dprintf(const char *, ...) ISC_FORMAT_PRINTF(1, 2);
#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)

View file

@ -15,7 +15,7 @@
* 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
@ -1218,10 +1218,14 @@ do { \
#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

View file

@ -15,7 +15,7 @@
* 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>
@ -102,29 +102,30 @@ find_port(dns_element_t *list, unsigned int len, in_port_t port) {
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

View file

@ -14,7 +14,7 @@
* 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 */
@ -40,7 +40,7 @@ fromtext_dlv(ARGS_FROMTEXT) {
*/
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));
@ -49,7 +49,7 @@ fromtext_dlv(ARGS_FROMTEXT) {
*/
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));
@ -58,7 +58,7 @@ fromtext_dlv(ARGS_FROMTEXT) {
*/
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;

View file

@ -15,7 +15,7 @@
* 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 */
@ -42,7 +42,7 @@ fromtext_ds(ARGS_FROMTEXT) {
*/
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));
@ -51,7 +51,7 @@ fromtext_ds(ARGS_FROMTEXT) {
*/
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));
@ -60,7 +60,7 @@ fromtext_ds(ARGS_FROMTEXT) {
*/
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;

View file

@ -15,7 +15,7 @@
* 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 */
@ -73,7 +73,7 @@ fromtext_rrsig(ARGS_FROMTEXT) {
*/
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));

View file

@ -15,7 +15,7 @@
* 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 */
@ -57,7 +57,7 @@ fromtext_in_apl(ARGS_FROMTEXT) {
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)

View file

@ -18,7 +18,7 @@
/*
* 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>
@ -1143,7 +1143,7 @@ algorithm_status(unsigned int alg) {
return (DST_R_UNSUPPORTEDALG);
}
isc_result_t
static isc_result_t
addsuffix(char *filename, unsigned int len, const char *ofilename,
const char *suffix)
{

View file

@ -18,7 +18,7 @@
/*
* 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>
@ -381,7 +381,7 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
fprintf(fp, "(HMAC_MD5)\n");
break;
default:
fprintf(fp, "(?)\n"); break;
fprintf(fp, "(?)\n");
break;
}

View file

@ -18,7 +18,7 @@
/*
* 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
@ -118,7 +118,7 @@ mem_realloc(void *ptr, size_t size) {
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);

View file

@ -18,7 +18,7 @@
/*
* 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
@ -536,7 +536,7 @@ BN_fromhex(BIGNUM *b, const char *str) {
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;

View file

@ -17,7 +17,7 @@
/*
* 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
@ -177,7 +177,7 @@ opensslrsa_sign(dst_context_t *dctx, isc_buffer_t *sig) {
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);

View file

@ -15,7 +15,7 @@
* 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>
@ -6729,7 +6729,7 @@ dns_zone_checknames(dns_zone_t *zone, dns_name_t *name, dns_rdata_t *rdata) {
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));

View file

@ -15,7 +15,7 @@
* 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>
@ -870,7 +870,7 @@ destroy(isc_mem_t *ctx) {
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);

View file

@ -15,7 +15,7 @@
* 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>
@ -118,16 +118,16 @@ isc_string_strlcpy(char *dst, const char *src, size_t size)
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++)
;
@ -145,15 +145,15 @@ isc_string_strlcat(char *dst, const char *src, size_t size)
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--;
}

View file

@ -48,7 +48,7 @@
* 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>
@ -394,7 +394,7 @@ dir_current(char *dirname, size_t length) {
isc_result_t result = ISC_R_SUCCESS;
REQUIRE(dirname != NULL);
REQUIRE(length > 0);
REQUIRE(length > 0U);
cwd = getcwd(dirname, length);

View file

@ -15,7 +15,7 @@
* 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>
@ -488,7 +488,7 @@ cmsg_space(ISC_SOCKADDR_LEN_T len) {
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
@ -535,7 +535,7 @@ process_cmsg(isc_socket_t *sock, struct msghdr *msg, isc_socketevent_t *dev) {
#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

View file

@ -15,7 +15,7 @@
* 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>
@ -1656,7 +1656,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
}
}
if ((flags & CFG_ADDR_V4PREFIXOK) != 0 &&
strlen(s) <= 15) {
strlen(s) <= 15U) {
char buf[64];
int i;
@ -1670,7 +1670,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
}
}
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 */
@ -1737,7 +1737,7 @@ cfg_parse_rawport(cfg_parser_t *pctx, unsigned int flags, in_port_t *port) {
"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);

View file

@ -1402,7 +1402,7 @@
./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
@ -1665,7 +1665,7 @@
./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

View file

@ -2,11 +2,11 @@ Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
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