From faf21a64b816af294ce57c5de341d7a999e4898a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 23 Jul 2003 02:23:06 +0000 Subject: [PATCH 1/4] regen --- bin/dig/dig.1 | 8 +++++++- bin/dig/dig.html | 31 +++++++++++++++++++++++-------- bin/nsupdate/nsupdate.8 | 2 +- bin/nsupdate/nsupdate.html | 2 +- bin/rndc/rndc-confgen.8 | 5 ++--- bin/rndc/rndc-confgen.html | 9 +++------ lib/lwres/man/lwres_context.3 | 2 +- lib/lwres/man/lwres_context.html | 2 +- 8 files changed, 39 insertions(+), 22 deletions(-) diff --git a/bin/dig/dig.1 b/bin/dig/dig.1 index 50aca1854f..65d0337267 100644 --- a/bin/dig/dig.1 +++ b/bin/dig/dig.1 @@ -48,6 +48,10 @@ Unless it is told to query a specific name server, .PP When no command line arguments or options are given, will perform an NS query for "." (the root). +.PP +It is possible to set per user defaults for \fBdig\fR via +\fI${HOME}/.digrc\fR. This file is read and any options in it +are applied before the command line arguements. .SH "SIMPLE USAGE" .PP A typical invocation of \fBdig\fR looks like: @@ -200,7 +204,7 @@ completeness. Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses. .TP -\fB+[no]recursive\fR +\fB+[no]recurse\fR Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means \fBdig\fR normally sends recursive queries. Recursion is automatically disabled @@ -352,6 +356,8 @@ isc.org. .SH "FILES" .PP \fI/etc/resolv.conf\fR +.PP +\fI${HOME}/.digrc\fR .SH "SEE ALSO" .PP \fBhost\fR(1), diff --git a/bin/dig/dig.html b/bin/dig/dig.html index 17ef7d6b4a..5ad1cdc3f1 100644 --- a/bin/dig/dig.html +++ b/bin/dig/dig.html @@ -186,11 +186,21 @@ CLASS="FILENAME" >

When no command line arguments or options are given, will perform an NS query for "." (the root).

It is possible to set per user defaults for dig via +${HOME}/.digrc. This file is read and any options in it +are applied before the command line arguements.

SIMPLE USAGE

OPTIONS

QUERY OPTIONS

+[no]recursive+[no]recurse

MULTIPLE QUERIES

FILES

/etc/resolv.conf

${HOME}/.digrc

SEE ALSO

BUGS

nsupdate -will send updates using an address and port choosen by the system. +will send updates using an address and port chosen by the system. - - - lwres_context_t</SPAN > -is returned throught +is returned through <TT CLASS="PARAMETER" ><I From 4757465d50517a1d2369446a43ba7ab5bafb571e Mon Sep 17 00:00:00 2001 From: Mark Andrews <marka@isc.org> Date: Wed, 23 Jul 2003 03:20:24 +0000 Subject: [PATCH 2/4] typo --- lib/isc/rwlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/rwlock.c b/lib/isc/rwlock.c index 5138b97aff..c31b2a11ca 100644 --- a/lib/isc/rwlock.c +++ b/lib/isc/rwlock.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rwlock.c,v 1.33.2.3 2003/07/22 04:03:48 marka Exp $ */ +/* $Id: rwlock.c,v 1.33.2.4 2003/07/23 03:20:24 marka Exp $ */ #include <config.h> @@ -298,7 +298,7 @@ isc_rwlock_unlock(isc_rwlock_t *rwl, isc_rwlocktype_t type) { } } } - INSIST(rwl->original == isc_rwlock_none); + INSIST(rwl->original == isc_rwlocktype_none); #ifdef ISC_RWLOCK_TRACE print_lock(isc_msgcat_get(isc_msgcat, ISC_MSGSET_RWLOCK, From 3afde524a1208d9d4aa16fc400a2db23b8a17853 Mon Sep 17 00:00:00 2001 From: Mark Andrews <marka@isc.org> Date: Wed, 23 Jul 2003 03:59:50 +0000 Subject: [PATCH 3/4] win32obj.obj -> win32os.obj --- lib/isc/win32/libisc.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/win32/libisc.mak b/lib/isc/win32/libisc.mak index 65edf9b878..e5d6913cb2 100644 --- a/lib/isc/win32/libisc.mak +++ b/lib/isc/win32/libisc.mak @@ -212,7 +212,7 @@ LINK32_OBJS= \ "$(INTDIR)\task.obj" \ "$(INTDIR)\taskpool.obj" \ "$(INTDIR)\timer.obj" \ - "$(INTDIR)\win32obj.obj" + "$(INTDIR)\win32os.obj" "..\..\..\Build\Release\libisc.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< From c1df871a18365b9ca54ead731e44d0540adf00e6 Mon Sep 17 00:00:00 2001 From: Mark Andrews <marka@isc.org> Date: Wed, 23 Jul 2003 06:57:59 +0000 Subject: [PATCH 4/4] silence compiler warnings (HPUX/11i) --- bin/dig/dig.c | 4 ++-- bin/dnssec/dnssec-signkey.c | 4 ++-- bin/dnssec/dnssectool.c | 4 ++-- bin/named/server.c | 4 ++-- bin/nsupdate/nsupdate.c | 6 +++--- lib/dns/gen.c | 4 ++-- lib/dns/name.c | 6 +++--- lib/dns/rdata.c | 6 +++--- lib/dns/rdata/any_255/tsig_250.c | 10 +++++----- lib/dns/rdata/generic/afsdb_18.c | 4 ++-- lib/dns/rdata/generic/cert_37.c | 4 ++-- lib/dns/rdata/generic/loc_29.c | 8 ++++---- lib/dns/rdata/generic/mx_15.c | 4 ++-- lib/dns/rdata/generic/rt_21.c | 4 ++-- lib/dns/rdata/generic/sig_24.c | 4 ++-- lib/dns/rdata/generic/tkey_249.c | 10 +++++----- lib/dns/rdata/in_1/a6_38.c | 4 ++-- lib/dns/rdata/in_1/kx_36.c | 4 ++-- lib/dns/rdata/in_1/naptr_35.c | 6 +++--- lib/dns/rdata/in_1/px_26.c | 4 ++-- lib/dns/rdata/in_1/srv_33.c | 8 ++++---- lib/dns/sec/dst/dst_api.c | 6 +++--- lib/dns/time.c | 4 ++-- lib/dns/zone.c | 4 ++-- lib/isc/entropy.c | 4 ++-- lib/isc/lex.c | 16 ++++++++-------- lib/isc/mem.c | 22 +++++++++++----------- lib/isc/pthreads/thread.c | 4 ++-- lib/isc/unix/dir.c | 4 ++-- lib/isc/unix/socket.c | 8 ++++---- lib/isc/unix/time.c | 6 +++--- lib/isccc/cc.c | 8 ++++---- lib/isccfg/parser.c | 6 +++--- lib/lwres/context.c | 8 ++++---- lib/lwres/getipnode.c | 6 +++--- lib/lwres/getnameinfo.c | 6 +++--- lib/lwres/getrrset.c | 4 ++-- lib/lwres/lwconfig.c | 28 ++++++++++++++-------------- lib/lwres/lwinetaton.c | 10 +++++----- lib/tests/t_api.c | 6 +++--- 40 files changed, 136 insertions(+), 136 deletions(-) diff --git a/bin/dig/dig.c b/bin/dig/dig.c index 6671f94e19..3e1194d433 100644 --- a/bin/dig/dig.c +++ b/bin/dig/dig.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dig.c,v 1.157.2.9 2003/07/22 04:03:31 marka Exp $ */ +/* $Id: dig.c,v 1.157.2.10 2003/07/23 06:57:57 marka Exp $ */ #include <config.h> #include <stdlib.h> @@ -891,7 +891,7 @@ dash_option(char *option, char *next, dig_lookup_t **lookup, struct in6_addr in6; cmd = option[0]; - if (strlen(option) > 1) { + if (strlen(option) > 1U) { value_from_next = ISC_FALSE; value = &option[1]; } else { diff --git a/bin/dnssec/dnssec-signkey.c b/bin/dnssec/dnssec-signkey.c index c97d5ff102..79aaf9be5a 100644 --- a/bin/dnssec/dnssec-signkey.c +++ b/bin/dnssec/dnssec-signkey.c @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssec-signkey.c,v 1.50.2.1 2001/10/05 00:21:46 bwelling Exp $ */ +/* $Id: dnssec-signkey.c,v 1.50.2.2 2003/07/23 06:57:58 marka Exp $ */ #include <config.h> @@ -258,7 +258,7 @@ main(int argc, char *argv[]) { setup_logging(verbose, mctx, &log); - if (strlen(argv[0]) < 8 || strncmp(argv[0], "keyset-", 7) != 0) + if (strlen(argv[0]) < 8U || strncmp(argv[0], "keyset-", 7) != 0) fatal("keyset file '%s' must start with keyset-", argv[0]); db = NULL; diff --git a/bin/dnssec/dnssectool.c b/bin/dnssec/dnssectool.c index 688890f13e..e7043bd964 100644 --- a/bin/dnssec/dnssectool.c +++ b/bin/dnssec/dnssectool.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dnssectool.c,v 1.31.2.2 2001/11/27 22:41:49 gson Exp $ */ +/* $Id: dnssectool.c,v 1.31.2.3 2003/07/23 06:57:58 marka Exp $ */ #include <config.h> @@ -244,7 +244,7 @@ strtotime(char *str, isc_int64_t now, isc_int64_t base) { if (*endp != '\0') fatal("time value %s is invalid", str); val = now + offset; - } else if (strlen(str) == 8) { + } else if (strlen(str) == 8U) { char timestr[15]; sprintf(timestr, "%s000000", str); result = dns_time64_fromtext(timestr, &val); diff --git a/bin/named/server.c b/bin/named/server.c index 0c291ca685..bc62686604 100644 --- a/bin/named/server.c +++ b/bin/named/server.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: server.c,v 1.339.2.13 2003/07/17 07:30:20 marka Exp $ */ +/* $Id: server.c,v 1.339.2.14 2003/07/23 06:57:58 marka Exp $ */ #include <config.h> @@ -936,7 +936,7 @@ create_version_zone(cfg_obj_t **maps, dns_zonemgr_t *zmgr, dns_view_t *view) { INSIST(result == ISC_R_SUCCESS); versiontext = cfg_obj_asstring(obj); len = strlen(versiontext); - if (len > 255) + if (len > 255U) len = 255; /* Silently truncate. */ buf[0] = len; memcpy(buf + 1, versiontext, len); diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c index a03baa4b21..72068352ed 100644 --- a/bin/nsupdate/nsupdate.c +++ b/bin/nsupdate/nsupdate.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: nsupdate.c,v 1.103.2.13 2003/07/22 04:03:36 marka Exp $ */ +/* $Id: nsupdate.c,v 1.103.2.14 2003/07/23 06:57:59 marka Exp $ */ #include <config.h> @@ -88,7 +88,7 @@ extern int h_errno; #define INITTEXT (2 * 1024) #define MAXTEXT (128 * 1024) #define FIND_TIMEOUT 5 -#define TTL_MAX 2147483647 /* Maximum signed 32 bit integer. */ +#define TTL_MAX 2147483647U /* Maximum signed 32 bit integer. */ #define DNSDEFAULTPORT 53 @@ -1172,7 +1172,7 @@ update_addordelete(char *cmdline, isc_boolean_t isdelete) { if (isdelete) ttl = 0; else if (ttl > TTL_MAX) { - fprintf(stderr, "ttl '%s' is out of range (0 to %d)\n", + fprintf(stderr, "ttl '%s' is out of range (0 to %u)\n", word, TTL_MAX); goto failure; } diff --git a/lib/dns/gen.c b/lib/dns/gen.c index 2b20424ac3..0de133578e 100644 --- a/lib/dns/gen.c +++ b/lib/dns/gen.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: gen.c,v 1.65.2.4 2003/07/22 04:03:41 marka Exp $ */ +/* $Id: gen.c,v 1.65.2.5 2003/07/23 06:57:48 marka Exp $ */ #include <config.h> @@ -772,7 +772,7 @@ main(int argc, char **argv) { "#define dns_rdatatype_%s\t%s" "((dns_rdatatype_t)dns_rdatatype_%s)" "\n", - s, strlen(s) < 2 ? "\t" : "", s); + s, strlen(s) < 2U ? "\t" : "", s); lasttype = tt->type; } diff --git a/lib/dns/name.c b/lib/dns/name.c index d363f57d93..e31c1699c4 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: name.c,v 1.127.2.5 2002/08/02 00:33:05 marka Exp $ */ +/* $Id: name.c,v 1.127.2.6 2003/07/23 06:57:48 marka Exp $ */ #include <config.h> @@ -1807,7 +1807,7 @@ dns_name_totext(dns_name_t *name, isc_boolean_t omit_final_dot, count = 256; nlen--; len = sprintf(num, "%u", count); /* XXX */ - INSIST(len <= 4); + INSIST(len <= 4U); bytes = count / 8; if (count % 8 != 0) bytes++; @@ -1960,7 +1960,7 @@ dns_name_tofilenametext(dns_name_t *name, isc_boolean_t omit_final_dot, count = 256; nlen--; len = sprintf(num, "%u", count); /* XXX */ - INSIST(len <= 4); + INSIST(len <= 4U); bytes = count / 8; if (count % 8 != 0) bytes++; diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index e9b29441ab..7d2c20e24f 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rdata.c,v 1.147.2.9 2003/07/22 04:03:43 marka Exp $ */ +/* $Id: rdata.c,v 1.147.2.10 2003/07/23 06:57:48 marka Exp $ */ #include <config.h> #include <ctype.h> @@ -620,7 +620,7 @@ unknown_fromtext(dns_rdataclass_t rdclass, dns_rdatatype_t type, result = isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE); - if (result == ISC_R_SUCCESS && token.value.as_ulong > 65535) + if (result == ISC_R_SUCCESS && token.value.as_ulong > 65535U) return (ISC_R_RANGE); result = isc_buffer_allocate(mctx, &buf, token.value.as_ulong); if (result != ISC_R_SUCCESS) @@ -1817,7 +1817,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if ((token.value.as_ulong % 4) != 0) + if ((token.value.as_ulong % 4) != 0U) isc_buffer_subtract(target, 4 - (token.value.as_ulong % 4)); /* diff --git a/lib/dns/rdata/any_255/tsig_250.c b/lib/dns/rdata/any_255/tsig_250.c index 776316e90e..64d7412908 100644 --- a/lib/dns/rdata/any_255/tsig_250.c +++ b/lib/dns/rdata/any_255/tsig_250.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tsig_250.c,v 1.52 2001/07/16 03:05:58 marka Exp $ */ +/* $Id: tsig_250.c,v 1.52.2.1 2003/07/23 06:57:49 marka Exp $ */ /* Reviewed: Thu Mar 16 13:39:43 PST 2000 by gson */ @@ -70,7 +70,7 @@ fromtext_any_tsig(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)); @@ -79,7 +79,7 @@ fromtext_any_tsig(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)); @@ -93,7 +93,7 @@ fromtext_any_tsig(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)); @@ -119,7 +119,7 @@ fromtext_any_tsig(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)); diff --git a/lib/dns/rdata/generic/afsdb_18.c b/lib/dns/rdata/generic/afsdb_18.c index 68ac619e4b..44f21e700b 100644 --- a/lib/dns/rdata/generic/afsdb_18.c +++ b/lib/dns/rdata/generic/afsdb_18.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: afsdb_18.c,v 1.39 2001/07/16 03:06:00 marka Exp $ */ +/* $Id: afsdb_18.c,v 1.39.2.1 2003/07/23 06:57:50 marka Exp $ */ /* Reviewed: Wed Mar 15 14:59:00 PST 2000 by explorer */ @@ -43,7 +43,7 @@ fromtext_afsdb(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)); diff --git a/lib/dns/rdata/generic/cert_37.c b/lib/dns/rdata/generic/cert_37.c index 51713502c5..a32c6db9ac 100644 --- a/lib/dns/rdata/generic/cert_37.c +++ b/lib/dns/rdata/generic/cert_37.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cert_37.c,v 1.40 2001/07/16 03:06:01 marka Exp $ */ +/* $Id: cert_37.c,v 1.40.2.1 2003/07/23 06:57:50 marka Exp $ */ /* Reviewed: Wed Mar 15 21:14:32 EST 2000 by tale */ @@ -53,7 +53,7 @@ fromtext_cert(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)); diff --git a/lib/dns/rdata/generic/loc_29.c b/lib/dns/rdata/generic/loc_29.c index 2cb2e2b080..b9ac79806c 100644 --- a/lib/dns/rdata/generic/loc_29.c +++ b/lib/dns/rdata/generic/loc_29.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: loc_29.c,v 1.30.2.2 2002/08/05 06:57:14 marka Exp $ */ +/* $Id: loc_29.c,v 1.30.2.3 2003/07/23 06:57:50 marka Exp $ */ /* Reviewed: Wed Mar 15 18:13:09 PST 2000 by explorer */ @@ -73,7 +73,7 @@ fromtext_loc(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 90) + if (token.value.as_ulong > 90U) RETTOK(ISC_R_RANGE); d1 = (int)token.value.as_ulong; /* @@ -142,7 +142,7 @@ fromtext_loc(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 180) + if (token.value.as_ulong > 180U) RETTOK(ISC_R_RANGE); d2 = (int)token.value.as_ulong; @@ -505,7 +505,7 @@ totext_loc(ARGS_TOTEXT) { altitude = uint32_fromregion(&sr); isc_region_consume(&sr, 4); - if (altitude < 10000000) { + if (altitude < 10000000U) { below = ISC_TRUE; altitude = 10000000 - altitude; } else { diff --git a/lib/dns/rdata/generic/mx_15.c b/lib/dns/rdata/generic/mx_15.c index 5be0a3aed8..704cb12495 100644 --- a/lib/dns/rdata/generic/mx_15.c +++ b/lib/dns/rdata/generic/mx_15.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mx_15.c,v 1.48 2001/07/16 03:06:19 marka Exp $ */ +/* $Id: mx_15.c,v 1.48.2.1 2003/07/23 06:57:51 marka Exp $ */ /* reviewed: Wed Mar 15 18:05:46 PST 2000 by brister */ @@ -38,7 +38,7 @@ fromtext_mx(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)); diff --git a/lib/dns/rdata/generic/rt_21.c b/lib/dns/rdata/generic/rt_21.c index ad76382890..6a78f1b9e2 100644 --- a/lib/dns/rdata/generic/rt_21.c +++ b/lib/dns/rdata/generic/rt_21.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: rt_21.c,v 1.37 2001/07/16 03:06:28 marka Exp $ */ +/* $Id: rt_21.c,v 1.37.2.1 2003/07/23 06:57:51 marka Exp $ */ /* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */ @@ -40,7 +40,7 @@ fromtext_rt(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)); diff --git a/lib/dns/rdata/generic/sig_24.c b/lib/dns/rdata/generic/sig_24.c index 36d3140efd..9fa5398f37 100644 --- a/lib/dns/rdata/generic/sig_24.c +++ b/lib/dns/rdata/generic/sig_24.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sig_24.c,v 1.54 2001/07/16 03:06:29 marka Exp $ */ +/* $Id: sig_24.c,v 1.54.2.1 2003/07/23 06:57:51 marka Exp $ */ /* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */ @@ -73,7 +73,7 @@ fromtext_sig(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)); diff --git a/lib/dns/rdata/generic/tkey_249.c b/lib/dns/rdata/generic/tkey_249.c index 159cfda4d3..1e22647969 100644 --- a/lib/dns/rdata/generic/tkey_249.c +++ b/lib/dns/rdata/generic/tkey_249.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: tkey_249.c,v 1.48 2001/07/16 03:06:32 marka Exp $ */ +/* $Id: tkey_249.c,v 1.48.2.1 2003/07/23 06:57:51 marka Exp $ */ /* * Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley. @@ -73,7 +73,7 @@ fromtext_tkey(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)); @@ -99,7 +99,7 @@ fromtext_tkey(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)); @@ -113,7 +113,7 @@ fromtext_tkey(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)); @@ -221,7 +221,7 @@ totext_tkey(ARGS_TOTEXT) { * Other Data. */ REQUIRE(n <= sr.length); - if (n != 0) { + if (n != 0U) { dr = sr; dr.length = n; if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0) diff --git a/lib/dns/rdata/in_1/a6_38.c b/lib/dns/rdata/in_1/a6_38.c index 6a8d8dc6ea..3abe7f9b56 100644 --- a/lib/dns/rdata/in_1/a6_38.c +++ b/lib/dns/rdata/in_1/a6_38.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a6_38.c,v 1.46 2001/07/26 21:34:00 gson Exp $ */ +/* $Id: a6_38.c,v 1.46.2.1 2003/07/23 06:57:51 marka Exp $ */ /* RFC2874 */ @@ -48,7 +48,7 @@ fromtext_in_a6(ARGS_FROMTEXT) { */ RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number, ISC_FALSE)); - if (token.value.as_ulong > 128) + if (token.value.as_ulong > 128U) RETTOK(ISC_R_RANGE); prefixlen = (unsigned char)token.value.as_ulong; diff --git a/lib/dns/rdata/in_1/kx_36.c b/lib/dns/rdata/in_1/kx_36.c index 3795f2cec8..047022d18b 100644 --- a/lib/dns/rdata/in_1/kx_36.c +++ b/lib/dns/rdata/in_1/kx_36.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: kx_36.c,v 1.37 2001/07/16 03:06:43 marka Exp $ */ +/* $Id: kx_36.c,v 1.37.2.1 2003/07/23 06:57:51 marka Exp $ */ /* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */ @@ -41,7 +41,7 @@ fromtext_in_kx(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)); diff --git a/lib/dns/rdata/in_1/naptr_35.c b/lib/dns/rdata/in_1/naptr_35.c index 292b50ef9f..a493e8f3f5 100644 --- a/lib/dns/rdata/in_1/naptr_35.c +++ b/lib/dns/rdata/in_1/naptr_35.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: naptr_35.c,v 1.43 2001/07/16 03:06:44 marka Exp $ */ +/* $Id: naptr_35.c,v 1.43.2.1 2003/07/23 06:57:51 marka Exp $ */ /* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */ @@ -44,7 +44,7 @@ fromtext_in_naptr(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)); @@ -53,7 +53,7 @@ fromtext_in_naptr(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)); diff --git a/lib/dns/rdata/in_1/px_26.c b/lib/dns/rdata/in_1/px_26.c index e5f8588d94..fd0d366895 100644 --- a/lib/dns/rdata/in_1/px_26.c +++ b/lib/dns/rdata/in_1/px_26.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: px_26.c,v 1.34 2001/07/16 03:06:48 marka Exp $ */ +/* $Id: px_26.c,v 1.34.2.1 2003/07/23 06:57:52 marka Exp $ */ /* Reviewed: Mon Mar 20 10:44:27 PST 2000 */ @@ -44,7 +44,7 @@ fromtext_in_px(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)); diff --git a/lib/dns/rdata/in_1/srv_33.c b/lib/dns/rdata/in_1/srv_33.c index 5c33bdc225..e6451988ea 100644 --- a/lib/dns/rdata/in_1/srv_33.c +++ b/lib/dns/rdata/in_1/srv_33.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: srv_33.c,v 1.36 2001/07/16 03:06:49 marka Exp $ */ +/* $Id: srv_33.c,v 1.36.2.1 2003/07/23 06:57:52 marka Exp $ */ /* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */ @@ -44,7 +44,7 @@ fromtext_in_srv(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)); @@ -53,7 +53,7 @@ fromtext_in_srv(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)); @@ -62,7 +62,7 @@ fromtext_in_srv(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)); diff --git a/lib/dns/sec/dst/dst_api.c b/lib/dns/sec/dst/dst_api.c index 84afc48a27..1ab3b044eb 100644 --- a/lib/dns/sec/dst/dst_api.c +++ b/lib/dns/sec/dst/dst_api.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: dst_api.c,v 1.88.2.2 2001/12/19 01:09:56 marka Exp $ + * $Id: dst_api.c,v 1.88.2.3 2003/07/23 06:57:53 marka Exp $ */ #include <config.h> @@ -987,7 +987,7 @@ buildfilename(dns_name_t *name, dns_keytag_t id, if (isc_buffer_availablelength(out) < strlen(directory)) return (ISC_R_NOSPACE); isc_buffer_putstr(out, directory); - if (strlen(directory) > 0 && + if (strlen(directory) > 0U && directory[strlen(directory) - 1] != '/') isc_buffer_putstr(out, "/"); } @@ -1106,7 +1106,7 @@ dst__mem_realloc(void *ptr, size_t size) { INSIST(dst_memory_pool != NULL); p = NULL; - if (size > 0) { + if (size > 0U) { p = dst__mem_alloc(size); if (p != NULL && ptr != NULL) memcpy(p, ptr, size); diff --git a/lib/dns/time.c b/lib/dns/time.c index b290840152..3975762773 100644 --- a/lib/dns/time.c +++ b/lib/dns/time.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.18.2.3 2003/07/22 04:03:44 marka Exp $ */ +/* $Id: time.c,v 1.18.2.4 2003/07/23 06:57:48 marka Exp $ */ #include <config.h> @@ -127,7 +127,7 @@ dns_time64_fromtext(char *source, isc_int64_t *target) { return (ISC_R_RANGE); \ } while (0) - if (strlen(source) != 14) + if (strlen(source) != 14U) return (DNS_R_SYNTAX); if (sscanf(source, "%4d%2d%2d%2d%2d%2d", &year, &month, &day, &hour, &minute, &second) != 6) diff --git a/lib/dns/zone.c b/lib/dns/zone.c index b45376abc8..e25815072f 100644 --- a/lib/dns/zone.c +++ b/lib/dns/zone.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: zone.c,v 1.333.2.21 2003/07/21 05:55:03 marka Exp $ */ +/* $Id: zone.c,v 1.333.2.22 2003/07/23 06:57:48 marka Exp $ */ #include <config.h> @@ -4417,7 +4417,7 @@ zone_tostr(dns_zone_t *zone, char *buf, size_t length) { isc_buffer_t buffer; REQUIRE(buf != NULL); - REQUIRE(length > 1); + REQUIRE(length > 1U); /* * Leave space for terminating '\0'. diff --git a/lib/isc/entropy.c b/lib/isc/entropy.c index d046e3e740..3f9ec23327 100644 --- a/lib/isc/entropy.c +++ b/lib/isc/entropy.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: entropy.c,v 1.3.2.1 2001/09/06 00:14:17 gson Exp $ */ +/* $Id: entropy.c,v 1.3.2.2 2003/07/23 06:57:53 marka Exp $ */ /* * This is the system independent part of the entropy module. It is @@ -303,7 +303,7 @@ entropypool_adddata(isc_entropy_t *ent, void *p, unsigned int len, addr = (unsigned long)p; buf = p; - if ((addr & 0x03) != 0) { + if ((addr & 0x03U) != 0U) { val = 0; switch (len) { case 3: diff --git a/lib/isc/lex.c b/lib/isc/lex.c index a440467fa2..85813f9fdb 100644 --- a/lib/isc/lex.c +++ b/lib/isc/lex.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lex.c,v 1.66.2.5 2002/03/26 00:55:07 marka Exp $ */ +/* $Id: lex.c,v 1.66.2.6 2003/07/23 06:57:53 marka Exp $ */ #include <config.h> @@ -92,7 +92,7 @@ isc_lex_create(isc_mem_t *mctx, size_t max_token, isc_lex_t **lexp) { */ REQUIRE(lexp != NULL && *lexp == NULL); - REQUIRE(max_token > 0); + REQUIRE(max_token > 0U); lex = isc_mem_get(mctx, sizeof *lex); if (lex == NULL) @@ -623,13 +623,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { state = lexstate_string; } } - if (remaining == 0) { + if (remaining == 0U) { result = grow_data(lex, &remaining, &curr, &prev); if (result != ISC_R_SUCCESS) goto done; } - INSIST(remaining > 0); + INSIST(remaining > 0U); *curr++ = c; *curr = '\0'; remaining--; @@ -653,13 +653,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { if ((options & ISC_LEXOPT_ESCAPE) != 0) escaped = (!escaped && c == '\\') ? ISC_TRUE : ISC_FALSE; - if (remaining == 0) { + if (remaining == 0U) { result = grow_data(lex, &remaining, &curr, &prev); if (result != ISC_R_SUCCESS) goto done; } - INSIST(remaining > 0); + INSIST(remaining > 0U); *curr++ = c; *curr = '\0'; remaining--; @@ -750,13 +750,13 @@ isc_lex_gettoken(isc_lex_t *lex, unsigned int options, isc_token_t *tokenp) { escaped = ISC_TRUE; else escaped = ISC_FALSE; - if (remaining == 0) { + if (remaining == 0U) { result = grow_data(lex, &remaining, &curr, &prev); if (result != ISC_R_SUCCESS) goto done; } - INSIST(remaining > 0); + INSIST(remaining > 0U); prev = curr; *curr++ = c; *curr = '\0'; diff --git a/lib/isc/mem.c b/lib/isc/mem.c index 43c6755b0b..2926a3e80f 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.c,v 1.98.2.6 2002/07/10 06:10:45 marka Exp $ */ +/* $Id: mem.c,v 1.98.2.7 2003/07/23 06:57:53 marka Exp $ */ #include <config.h> @@ -647,10 +647,10 @@ mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) { ctx->inuse -= size; if (size > ctx->max_size) { - INSIST(ctx->stats[ctx->max_size].gets > 0); + INSIST(ctx->stats[ctx->max_size].gets > 0U); ctx->stats[ctx->max_size].gets--; } else { - INSIST(ctx->stats[size].gets > 0); + INSIST(ctx->stats[size].gets > 0U); ctx->stats[size].gets--; } } @@ -664,7 +664,7 @@ mem_putstats(isc_mem_t *ctx, void *ptr, size_t size) { static void * default_memalloc(void *arg, size_t size) { UNUSED(arg); - if (size == 0) + if (size == 0U) size = 1; return (malloc(size)); } @@ -701,7 +701,7 @@ isc_mem_createx(size_t init_max_size, size_t target_size, if (ctx == NULL) return (ISC_R_NOMEMORY); - if (init_max_size == 0) + if (init_max_size == 0U) ctx->max_size = DEF_MAX_SIZE; else ctx->max_size = init_max_size; @@ -833,7 +833,7 @@ destroy(isc_mem_t *ctx) { if (ctx->stats[i].gets != 0) print_active(ctx, stderr); #endif - INSIST(ctx->stats[i].gets == 0); + INSIST(ctx->stats[i].gets == 0U); } } @@ -992,14 +992,14 @@ isc__mem_get(isc_mem_t *ctx, size_t size FLARG) { #endif /* ISC_MEM_USE_INTERNAL_MALLOC */ ADD_TRACE(ctx, ptr, size, file, line); - if (ctx->hi_water != 0 && !ctx->hi_called && + if (ctx->hi_water != 0U && !ctx->hi_called && ctx->inuse > ctx->hi_water) { ctx->hi_called = ISC_TRUE; call_water = ISC_TRUE; } if (ctx->inuse > ctx->maxinuse) { ctx->maxinuse = ctx->inuse; - if (ctx->hi_water != 0 && ctx->inuse > ctx->hi_water && + if (ctx->hi_water != 0U && ctx->inuse > ctx->hi_water && (isc_mem_debugging & ISC_MEM_DEBUGUSAGE) != 0) fprintf(stderr, "maxinuse = %lu\n", (unsigned long)ctx->inuse); @@ -1038,7 +1038,7 @@ isc__mem_put(isc_mem_t *ctx, void *ptr, size_t size FLARG) * isc_mem_setwater() called with 0 for hi_water and lo_water. */ if (ctx->hi_called && - (ctx->inuse < ctx->lo_water || ctx->lo_water == 0)) { + (ctx->inuse < ctx->lo_water || ctx->lo_water == 0U)) { ctx->hi_called = ISC_FALSE; if (ctx->water != NULL) @@ -1100,7 +1100,7 @@ isc_mem_stats(isc_mem_t *ctx, FILE *out) { for (i = 0; i <= ctx->max_size; i++) { s = &ctx->stats[i]; - if (s->totalgets == 0 && s->gets == 0) + if (s->totalgets == 0U && s->gets == 0U) continue; fprintf(out, "%s%5lu: %11lu gets, %11lu rem", (i == ctx->max_size) ? ">=" : " ", @@ -1340,7 +1340,7 @@ isc_mempool_create(isc_mem_t *mctx, size_t size, isc_mempool_t **mpctxp) { isc_mempool_t *mpctx; REQUIRE(VALID_CONTEXT(mctx)); - REQUIRE(size > 0); + REQUIRE(size > 0U); REQUIRE(mpctxp != NULL && *mpctxp == NULL); /* diff --git a/lib/isc/pthreads/thread.c b/lib/isc/pthreads/thread.c index 7e24cedc62..daa070dc3a 100644 --- a/lib/isc/pthreads/thread.c +++ b/lib/isc/pthreads/thread.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: thread.c,v 1.9 2001/01/09 21:58:02 bwelling Exp $ */ +/* $Id: thread.c,v 1.9.2.1 2003/07/23 06:57:54 marka Exp $ */ #include <config.h> @@ -23,7 +23,7 @@ #include <isc/util.h> #ifndef THREAD_MINSTACKSIZE -#define THREAD_MINSTACKSIZE (64 * 1024) +#define THREAD_MINSTACKSIZE (64U * 1024) #endif isc_result_t diff --git a/lib/isc/unix/dir.c b/lib/isc/unix/dir.c index bb852885cd..a2f8c6a4a1 100644 --- a/lib/isc/unix/dir.c +++ b/lib/isc/unix/dir.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: dir.c,v 1.18 2001/06/08 23:50:31 tale Exp $ */ +/* $Id: dir.c,v 1.18.2.1 2003/07/23 06:57:54 marka Exp $ */ /* Principal Authors: DCL */ @@ -164,7 +164,7 @@ isc_dir_current(char *dirname, size_t length, isc_boolean_t end_sep) { * XXXDCL Could automatically allocate memory if dirname == NULL. */ REQUIRE(dirname != NULL); - REQUIRE(length > 0); + REQUIRE(length > 0U); cwd = getcwd(dirname, length); diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index 547d031a40..c3052f5025 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.207.2.18 2003/07/22 04:03:49 marka Exp $ */ +/* $Id: socket.c,v 1.207.2.19 2003/07/23 06:57:54 marka Exp $ */ #include <config.h> @@ -648,7 +648,7 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev, buffer = ISC_LIST_NEXT(buffer, link); } - INSIST(skip_count == 0); + INSIST(skip_count == 0U); config: msg->msg_iov = iov; @@ -990,7 +990,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) { dev->n += cc; actual_count = cc; buffer = ISC_LIST_HEAD(dev->bufferlist); - while (buffer != NULL && actual_count > 0) { + while (buffer != NULL && actual_count > 0U) { REQUIRE(ISC_BUFFER_VALID(buffer)); if (isc_buffer_availablelength(buffer) <= actual_count) { actual_count -= isc_buffer_availablelength(buffer); @@ -1003,7 +1003,7 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) { } buffer = ISC_LIST_NEXT(buffer, link); if (buffer == NULL) { - INSIST(actual_count == 0); + INSIST(actual_count == 0U); } } diff --git a/lib/isc/unix/time.c b/lib/isc/unix/time.c index 328f72b727..2945a87808 100644 --- a/lib/isc/unix/time.c +++ b/lib/isc/unix/time.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: time.c,v 1.34.2.5 2001/10/22 23:28:26 gson Exp $ */ +/* $Id: time.c,v 1.34.2.6 2003/07/23 06:57:54 marka Exp $ */ #include <config.h> @@ -173,7 +173,7 @@ isc_time_now(isc_time_t *t) { * Ensure the tv_sec value fits in t->seconds. */ if (sizeof(tv.tv_sec) > sizeof(t->seconds) && - ((tv.tv_sec | (unsigned int)-1) ^ (unsigned int)-1) != 0) + ((tv.tv_sec | (unsigned int)-1) ^ (unsigned int)-1) != 0U) return (ISC_R_RANGE); t->seconds = tv.tv_sec; @@ -366,7 +366,7 @@ isc_time_secondsastimet(isc_time_t *t, time_t *secondsp) { (time_t)0.5 != 0.5 && /* Not a floating point type. */ (i = (time_t)-1) != 4294967295u && /* Is signed. */ (seconds & - (1U << (sizeof(time_t) * CHAR_BIT - 1))) != 0) { /* Negative. */ + (1U << (sizeof(time_t) * CHAR_BIT - 1))) != 0U) { /* Negative. */ /* * This UNUSED() is here to shut up the IRIX compiler: * variable "i" was set but never used diff --git a/lib/isccc/cc.c b/lib/isccc/cc.c index 9ac82ad7b6..6750e91340 100644 --- a/lib/isccc/cc.c +++ b/lib/isccc/cc.c @@ -16,7 +16,7 @@ * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: cc.c,v 1.4.2.2 2002/03/26 00:55:13 marka Exp $ */ +/* $Id: cc.c,v 1.4.2.3 2003/07/23 06:57:55 marka Exp $ */ #include <config.h> @@ -105,7 +105,7 @@ value_towire(isccc_sexpr_t *elt, isccc_region_t *target) * the placeholder length too. Adjust and * emit. */ - INSIST(len >= 4); + INSIST(len >= 4U); len -= 4; PUT32(len, lenp); } else if (isccc_sexpr_listp(elt)) { @@ -128,7 +128,7 @@ value_towire(isccc_sexpr_t *elt, isccc_region_t *target) * 'len' is 4 bytes too big, since it counts * the placeholder length. Adjust and emit. */ - INSIST(len >= 4); + INSIST(len >= 4U); len -= 4; PUT32(len, lenp); } @@ -152,7 +152,7 @@ table_towire(isccc_sexpr_t *alist, isccc_region_t *target) ks = isccc_sexpr_tostring(k); v = ISCCC_SEXPR_CDR(kv); len = strlen(ks); - INSIST(len <= 255); + INSIST(len <= 255U); /* * Emit the key name. */ diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c index c16509641a..c9dd28b97d 100644 --- a/lib/isccfg/parser.c +++ b/lib/isccfg/parser.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: parser.c,v 1.70.2.19 2003/07/08 23:14:51 marka Exp $ */ +/* $Id: parser.c,v 1.70.2.20 2003/07/23 06:57:55 marka Exp $ */ #include <config.h> @@ -2772,7 +2772,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) { } } if ((flags & V4PREFIXOK) != 0 && - strlen(s) <= 15) { + strlen(s) <= 15U) { char buf[64]; int i; @@ -2831,7 +2831,7 @@ get_port(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) { parser_error(pctx, LOG_NEAR, "port number out of range"); return (ISC_R_UNEXPECTEDTOKEN); diff --git a/lib/lwres/context.c b/lib/lwres/context.c index 646f348da4..96e1ff6a58 100644 --- a/lib/lwres/context.c +++ b/lib/lwres/context.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: context.c,v 1.41 2001/07/19 16:59:32 gson Exp $ */ +/* $Id: context.c,v 1.41.2.1 2003/07/23 06:57:56 marka Exp $ */ #include <config.h> @@ -152,14 +152,14 @@ lwres_context_initserial(lwres_context_t *ctx, lwres_uint32_t serial) { void lwres_context_freemem(lwres_context_t *ctx, void *mem, size_t len) { REQUIRE(mem != NULL); - REQUIRE(len != 0); + REQUIRE(len != 0U); CTXFREE(mem, len); } void * lwres_context_allocmem(lwres_context_t *ctx, size_t len) { - REQUIRE(len != 0); + REQUIRE(len != 0U); return (CTXMALLOC(len)); } @@ -349,7 +349,7 @@ lwres_context_sendrecv(lwres_context_t *ctx, * Type of tv_sec is long, so make sure the unsigned long timeout * does not overflow it. */ - if (ctx->timeout <= LONG_MAX) + if (ctx->timeout <= (unsigned int)LONG_MAX) timeout.tv_sec = (long)ctx->timeout; else timeout.tv_sec = LONG_MAX; diff --git a/lib/lwres/getipnode.c b/lib/lwres/getipnode.c index f4def6a885..3b2b780b45 100644 --- a/lib/lwres/getipnode.c +++ b/lib/lwres/getipnode.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getipnode.c,v 1.30.2.3 2002/08/08 21:29:07 marka Exp $ */ +/* $Id: getipnode.c,v 1.30.2.4 2003/07/23 06:57:56 marka Exp $ */ #include <config.h> @@ -242,13 +242,13 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) { switch (af) { case AF_INET: - if (len != INADDRSZ) { + if (len != (unsigned int)INADDRSZ) { *error_num = NO_RECOVERY; return (NULL); } break; case AF_INET6: - if (len != IN6ADDRSZ) { + if (len != (unsigned int)IN6ADDRSZ) { *error_num = NO_RECOVERY; return (NULL); } diff --git a/lib/lwres/getnameinfo.c b/lib/lwres/getnameinfo.c index 8809542bcd..51fd8008ad 100644 --- a/lib/lwres/getnameinfo.c +++ b/lib/lwres/getnameinfo.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getnameinfo.c,v 1.30.2.2 2003/07/22 04:03:53 marka Exp $ */ +/* $Id: getnameinfo.c,v 1.30.2.3 2003/07/23 06:57:56 marka Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -162,7 +162,7 @@ lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, } proto = (flags & NI_DGRAM) ? "udp" : "tcp"; - if (serv == NULL || servlen == 0) { + if (serv == NULL || servlen == 0U) { /* * Caller does not want service. */ @@ -197,7 +197,7 @@ lwres_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, } #endif - if (host == NULL || hostlen == 0) { + if (host == NULL || hostlen == 0U) { /* * What should we do? */ diff --git a/lib/lwres/getrrset.c b/lib/lwres/getrrset.c index 73c1a301d7..208c4a0f1b 100644 --- a/lib/lwres/getrrset.c +++ b/lib/lwres/getrrset.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: getrrset.c,v 1.11.2.2 2002/08/05 06:57:16 marka Exp $ */ +/* $Id: getrrset.c,v 1.11.2.3 2003/07/23 06:57:56 marka Exp $ */ #include <config.h> @@ -48,7 +48,7 @@ lwresult_to_result(lwres_result_t lwresult) { static void * sane_malloc(size_t size) { - if (size == 0) + if (size == 0U) size = 1; return (malloc(size)); } diff --git a/lib/lwres/lwconfig.c b/lib/lwres/lwconfig.c index d6ff3de4d2..48635fb2c1 100644 --- a/lib/lwres/lwconfig.c +++ b/lib/lwres/lwconfig.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: lwconfig.c,v 1.33 2001/07/10 18:25:45 gson Exp $ */ +/* $Id: lwconfig.c,v 1.33.2.1 2003/07/23 06:57:57 marka Exp $ */ /*** *** Module for parsing resolv.conf files. @@ -156,7 +156,7 @@ getword(FILE *fp, char *buffer, size_t size) { char *p = buffer; REQUIRE(buffer != NULL); - REQUIRE(size > 0); + REQUIRE(size > 0U); *p = '\0'; @@ -194,7 +194,7 @@ lwres_strdup(lwres_context_t *ctx, const char *str) { char *p; REQUIRE(str != NULL); - REQUIRE(strlen(str) > 0); + REQUIRE(strlen(str) > 0U); p = CTXMALLOC(strlen(str) + 1); if (p != NULL) @@ -284,7 +284,7 @@ lwres_conf_parsenameserver(lwres_context_t *ctx, FILE *fp) { return (LWRES_R_SUCCESS); res = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing on line. */ else if (res == ' ' || res == '\t') res = eatwhite(fp); @@ -312,7 +312,7 @@ lwres_conf_parselwserver(lwres_context_t *ctx, FILE *fp) { return (LWRES_R_SUCCESS); res = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing on line. */ else if (res == ' ' || res == '\t') res = eatwhite(fp); @@ -337,7 +337,7 @@ lwres_conf_parsedomain(lwres_context_t *ctx, FILE *fp) { confdata = &ctx->confdata; res = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing else on line. */ else if (res == ' ' || res == '\t') res = eatwhite(fp); @@ -399,11 +399,11 @@ lwres_conf_parsesearch(lwres_context_t *ctx, FILE *fp) { confdata->searchnxt = 0; delim = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Nothing else on line. */ idx = 0; - while (strlen(word) > 0) { + while (strlen(word) > 0U) { if (confdata->searchnxt == LWRES_CONFMAXSEARCH) goto ignore; /* Too many domains. */ @@ -460,10 +460,10 @@ lwres_conf_parsesortlist(lwres_context_t *ctx, FILE *fp) { confdata = &ctx->confdata; delim = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Empty line after keyword. */ - while (strlen(word) > 0) { + while (strlen(word) > 0U) { if (confdata->sortlistnxt == LWRES_CONFMAXSORTLIST) return (LWRES_R_FAILURE); /* Too many values. */ @@ -516,10 +516,10 @@ lwres_conf_parseoption(lwres_context_t *ctx, FILE *fp) { confdata = &ctx->confdata; delim = getword(fp, word, sizeof(word)); - if (strlen(word) == 0) + if (strlen(word) == 0U) return (LWRES_R_FAILURE); /* Empty line after keyword. */ - while (strlen(word) > 0) { + while (strlen(word) > 0U) { if (strcmp("debug", word) == 0) { confdata->resdebug = 1; } else if (strcmp("no_tld_query", word) == 0) { @@ -554,7 +554,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) { confdata = &ctx->confdata; REQUIRE(filename != NULL); - REQUIRE(strlen(filename) > 0); + REQUIRE(strlen(filename) > 0U); REQUIRE(confdata != NULL); errno = 0; @@ -569,7 +569,7 @@ lwres_conf_parse(lwres_context_t *ctx, const char *filename) { break; } - if (strlen(word) == 0) + if (strlen(word) == 0U) rval = LWRES_R_SUCCESS; else if (strcmp(word, "nameserver") == 0) rval = lwres_conf_parsenameserver(ctx, fp); diff --git a/lib/lwres/lwinetaton.c b/lib/lwres/lwinetaton.c index b95bbe078e..97907d83ce 100644 --- a/lib/lwres/lwinetaton.c +++ b/lib/lwres/lwinetaton.c @@ -70,7 +70,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static char rcsid[] = "$Id: lwinetaton.c,v 1.10 2001/01/09 21:59:25 bwelling Exp $"; +static char rcsid[] = "$Id: lwinetaton.c,v 1.10.2.1 2003/07/23 06:57:57 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include <config.h> @@ -152,7 +152,7 @@ lwres_net_aton(const char *cp, struct in_addr *addr) { * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ - if (pp >= parts + 3 || val > 0xff) + if (pp >= parts + 3 || val > 0xffU) return (0); *pp++ = (lwres_uint8_t)val; c = *++cp; @@ -179,19 +179,19 @@ lwres_net_aton(const char *cp, struct in_addr *addr) { break; case 2: /* a.b -- 8.24 bits */ - if (val > 0xffffff) + if (val > 0xffffffU) return (0); val |= parts[0] << 24; break; case 3: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff) + if (val > 0xffffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16); break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff) + if (val > 0xffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); break; diff --git a/lib/tests/t_api.c b/lib/tests/t_api.c index 6f40aa6c0b..cb5f4826e2 100644 --- a/lib/tests/t_api.c +++ b/lib/tests/t_api.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: t_api.c,v 1.48 2001/07/11 18:51:22 bwelling Exp $ */ +/* $Id: t_api.c,v 1.48.2.1 2003/07/23 06:57:57 marka Exp $ */ #include <config.h> @@ -534,7 +534,7 @@ t_fgetbs(FILE *fp) { } } *p = '\0'; - return(((c == EOF) && (n == 0)) ? NULL : buf); + return(((c == EOF) && (n == 0U)) ? NULL : buf); } else { fprintf(stderr, "malloc failed %d", errno); return(NULL); @@ -569,7 +569,7 @@ t_getdate(char *buf, size_t buflen) { t = time(NULL); p = localtime(&t); n = strftime(buf, buflen - 1, "%A %d %B %H:%M:%S %Y\n", p); - return(n != 0 ? buf : NULL); + return(n != 0U ? buf : NULL); } /*