]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warnings (HPUX/11i)
authorMark Andrews <marka@isc.org>
Wed, 23 Jul 2003 06:57:59 +0000 (06:57 +0000)
committerMark Andrews <marka@isc.org>
Wed, 23 Jul 2003 06:57:59 +0000 (06:57 +0000)
40 files changed:
bin/dig/dig.c
bin/dnssec/dnssec-signkey.c
bin/dnssec/dnssectool.c
bin/named/server.c
bin/nsupdate/nsupdate.c
lib/dns/gen.c
lib/dns/name.c
lib/dns/rdata.c
lib/dns/rdata/any_255/tsig_250.c
lib/dns/rdata/generic/afsdb_18.c
lib/dns/rdata/generic/cert_37.c
lib/dns/rdata/generic/loc_29.c
lib/dns/rdata/generic/mx_15.c
lib/dns/rdata/generic/rt_21.c
lib/dns/rdata/generic/sig_24.c
lib/dns/rdata/generic/tkey_249.c
lib/dns/rdata/in_1/a6_38.c
lib/dns/rdata/in_1/kx_36.c
lib/dns/rdata/in_1/naptr_35.c
lib/dns/rdata/in_1/px_26.c
lib/dns/rdata/in_1/srv_33.c
lib/dns/sec/dst/dst_api.c
lib/dns/time.c
lib/dns/zone.c
lib/isc/entropy.c
lib/isc/lex.c
lib/isc/mem.c
lib/isc/pthreads/thread.c
lib/isc/unix/dir.c
lib/isc/unix/socket.c
lib/isc/unix/time.c
lib/isccc/cc.c
lib/isccfg/parser.c
lib/lwres/context.c
lib/lwres/getipnode.c
lib/lwres/getnameinfo.c
lib/lwres/getrrset.c
lib/lwres/lwconfig.c
lib/lwres/lwinetaton.c
lib/tests/t_api.c

index 6671f94e199beeffcbd29ca36bd7df934fab8438..3e1194d4331d1d29237ba99c220b7a851225ec17 100644 (file)
@@ -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 {
index c97d5ff102bc52e6f41a95d67064ee32044466c9..79aaf9be5a9cfb733aec46d8f94556a12e8a0182 100644 (file)
@@ -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;
index 688890f13e2c0e94c0697cf218f8c1d204c18d5e..e7043bd96414a5492b3af308a4d9fc10e1863a8f 100644 (file)
@@ -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);
index 0c291ca6854698c3db7bb04a139fd417d4718546..bc626866047403b96550e1c699220057152e6365 100644 (file)
@@ -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);
index a03baa4b21ae74e15dee6fb0295d3bd569c54b62..72068352ed264cf5322110e9174290dafdf588d6 100644 (file)
@@ -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;
        }
index 2b20424ac34f88763f48234e715f9865652185ce..0de133578efed461ad9d44261b37314064eb6259 100644 (file)
@@ -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;
                        }
 
index d363f57d93559841b0503fbe1377a4a6deb9e81b..e31c1699c45a43a522cd9c53202a54cfffa3f00c 100644 (file)
@@ -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++;
index e9b29441ab50426f81a3693ee0d8952d65b8fe76..7d2c20e24fe43fc2ed9223e074f1887258ff5437 100644 (file)
@@ -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));
 
        /*
index 776316e90e1667ea565c920e77ddf3d514b13ed7..64d74129087cf293c452ac8f7c468c1909c7057c 100644 (file)
@@ -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));
 
index 68ac619e4ba4ff1276f43937bbb8a9425251b088..44f21e700b1fa5c75539713452faca230bb60148 100644 (file)
@@ -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));
 
index 51713502c53c15cad81b397817be9c193222294d..a32c6db9acd4920ae2bf43d208347e1dd9e16c03 100644 (file)
@@ -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));
 
index 2cb2e2b080ff2a0992026038a136ab667661479f..b9ac79806cfbb2b62d3602b7509b49b46eb760d2 100644 (file)
@@ -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 {
index 5be0a3aed8b98ced3c991af298f455b0c6197a51..704cb1249554b683e6c1205fc0902b4d3bd08095 100644 (file)
@@ -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));
 
index ad76382890df9306b36a265d81bded8b6e08b550..6a78f1b9e20c52f40f9e00663f757fec324dd597 100644 (file)
@@ -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));
 
index 36d3140efdd17ce62c1b90ad51d6228938a091ae..9fa5398f37b96d090f1a65addaa5cbbc10bbaf88 100644 (file)
@@ -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));
index 159cfda4d3a8f49743536388350ae5283546b0a3..1e2264796942538b71468031c10a7aaaf84c2863 100644 (file)
@@ -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)
index 6a8d8dc6ea318d7eff07e2e348f200d9b67bd0f3..3abe7f9b566cffe68e5ebb867f5cdc04d151d275 100644 (file)
@@ -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;
index 3795f2cec816666b3254e226e5ad49357fbb0abb..047022d18b9838126b194b87e6178f3ba6f9688d 100644 (file)
@@ -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));
 
index 292b50ef9f6c004ebea843086e20f9f1747ae4fa..a493e8f3f5a33b2d2683020b0447482ee068e8dd 100644 (file)
@@ -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));
 
index e5f8588d94b7e2a338422036a67ccb250e26dea3..fd0d3668951057ab31a16e6c9a171bac7be49f77 100644 (file)
@@ -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));
 
index 5c33bdc225da001ae8ce7347db5bff63d1e05af2..e6451988ea80dc80bcd9d1113ce9dcff12507e71 100644 (file)
@@ -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));
 
index 84afc48a2778081a08298d4b3de88ff38eee43b0..1ab3b044eb58fb0cc1a9f59cf1b11e7e1310d5bf 100644 (file)
@@ -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);
index b2908401523c76c12368a7205e0d6693dece24ef..3975762773197e954305d9a92b28f44a0ace01b4 100644 (file)
@@ -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)
index b45376abc8153e925451ddeea1739002b6144324..e25815072f10344f06ca3835cc22cea88e132893 100644 (file)
@@ -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'.
index d046e3e740f875e3137149e430913a7d4820415b..3f9ec2332722aa2f01f11524db1fbb25adfff37b 100644 (file)
@@ -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:
index a440467fa2edf1f8cf76d5697fbf8a9bee7c2ca5..85813f9fdb5dc1101600feb3472c2f31df9634e7 100644 (file)
@@ -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';
index 43c6755b0b6005d632c50420fa86a25471bc0fa2..2926a3e80fe265243fc90900e034cf734fb77398 100644 (file)
@@ -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);
 
        /*
index 7e24cedc625e45204c6953d110c375a65fba6bfc..daa070dc3a4cb59a9c089cafbb9b624b9f616103 100644 (file)
@@ -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
index bb852885cdc35b58d05e7f1e8333eb084a3b5d23..a2f8c6a4a19acd7d54f55858c75761780cfaec2b 100644 (file)
@@ -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);
 
index 547d031a40d5a3eeaeec460b2a6a38b606fba944..c3052f50251c25d8c0db8dea35f92a8096f327cb 100644 (file)
@@ -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);
                }
        }
 
index 328f72b727ec84670c804740ab7cfcfa9509002f..2945a87808439148cf72950f7e3fb0108b6950ec 100644 (file)
@@ -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
index 9ac82ad7b6801333f18f9a2a5d0c42923355cfec..6750e913405c6ea46a6ee4b41aa5dd5d354ec8a0 100644 (file)
@@ -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.
                 */
index c16509641afd097b14edaa0f1e91b508265b5e85..c9dd28b97dc856f8ebb02e7e99b4b635f2889d75 100644 (file)
@@ -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);
index 646f348da44cc1b42bcfa4db574c3ac9ec336c4c..96e1ff6a5821f01b184522a018742b430730fd56 100644 (file)
@@ -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;
index f4def6a8859407d26e9f11e1eb24c81c9af88716..3b2b780b4566eb05f41daac3f4378b80a36dddba 100644 (file)
@@ -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);
                }
index 8809542bcd553916dc7bc6d58cf65ba6ff7f94f3..51fd8008ad21f8ab7c00e1fe51d6be4cc03d7c48 100644 (file)
@@ -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?
                 */
index 73c1a301d7d60e87441a8ce7f60f895658ad5404..208c4a0f1b78ab3f4293c497d3a87be33b5f5840 100644 (file)
@@ -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));
 }
index d6ff3de4d25bbe120704aa58933bfcb9a88b1646..48635fb2c162c9762a196a67614d9de8d47840a0 100644 (file)
@@ -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);
index b95bbe078ef10480dd842736aa87e964d35afc47..97907d83ce9e130abe4b39911beba0bd057432d7 100644 (file)
@@ -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;
index 6f40aa6c0b9b854353ca98f82f90db1393ef9d37..cb5f4826e2a7c8eeeb9cff5dd06de6271004ac5f 100644 (file)
@@ -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);
 }
 
 /*