]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warnings
authorMark Andrews <marka@isc.org>
Wed, 17 Mar 2004 00:40:15 +0000 (00:40 +0000)
committerMark Andrews <marka@isc.org>
Wed, 17 Mar 2004 00:40:15 +0000 (00:40 +0000)
25 files changed:
lib/bind/dst/md5_dgst.c
lib/bind/inet/inet_addr.c
lib/bind/inet/inet_cidr_ntop.c
lib/bind/inet/inet_cidr_pton.c
lib/bind/inet/inet_makeaddr.c
lib/bind/inet/inet_net_pton.c
lib/bind/inet/inet_network.c
lib/bind/irs/dns.c
lib/bind/irs/dns_ho.c
lib/bind/irs/dns_nw.c
lib/bind/irs/dns_p.h
lib/bind/irs/gen.c
lib/bind/irs/irpmarshall.c
lib/bind/irs/irs_data.c
lib/bind/irs/lcl.c
lib/bind/irs/lcl_ho.c
lib/bind/irs/lcl_nw.c
lib/bind/isc/base64.c
lib/bind/isc/ctl_clnt.c
lib/bind/isc/ctl_p.c
lib/bind/isc/ctl_srvr.c
lib/bind/isc/ev_streams.c
lib/bind/isc/ev_timers.c
lib/bind/isc/memcluster.c
lib/bind/nameser/ns_print.c

index 78882d1c958871ae29f8605ebf12c0659ca23c2e..340b6a5d0d109397a0fc3f8000cc176b3811a53a 100644 (file)
@@ -99,7 +99,7 @@ unsigned long len;
        int sw,sc;
        ULONG l;
 
-       if (len == 0) return;
+       if (len == 0U) return;
 
        l=(c->Nl+(len<<3))&0xffffffffL;
        /* 95-05-24 eay Fixed a bug with the overflow handling, thanks to
@@ -136,7 +136,7 @@ unsigned long len;
                        int ew,ec;
 
                        c->num+=(int)len;
-                       if ((sc+len) < 4) /* ugly, add char's to a word */
+                       if ((sc+len) < 4U) /* ugly, add char's to a word */
                                {
                                l= p[sw];
                                p_c2l_p(data,l,sc,len);
index 5776aac5f190e3923ae3ee237ba91331fefdd7b7..f6867fa02826a2c5acc6ca4529462ca269e1af68 100644 (file)
@@ -70,7 +70,7 @@
 
 #if defined(LIBC_SCCS) && !defined(lint)
 static const char sccsid[] = "@(#)inet_addr.c  8.1 (Berkeley) 6/17/93";
-static const char rcsid[] = "$Id: inet_addr.c,v 1.2.2.1 2004/03/09 09:17:26 marka Exp $";
+static const char rcsid[] = "$Id: inet_addr.c,v 1.2.2.2 2004/03/17 00:40:10 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #include "port_before.h"
@@ -156,7 +156,7 @@ inet_aton(const char *cp, struct in_addr *addr) {
                         *      a.b.c   (with c treated as 16 bits)
                         *      a.b     (with b treated as 24 bits)
                         */
-                       if (pp >= parts + 3 || val > 0xff)
+                       if (pp >= parts + 3 || val > 0xffU)
                                return (0);
                        *pp++ = val;
                        c = *++cp;
@@ -183,19 +183,19 @@ inet_aton(const char *cp, struct in_addr *addr) {
                break;
 
        case 2:                         /* a.b -- 8.24 bits */
-               if (val > 0xffffff)
+               if (val > 0xffffffU)
                        return (0);
                val |= parts[0] << 24;
                break;
 
        case 3:                         /* a.b.c -- 8.8.16 bits */
-               if (val > 0xffff)
+               if (val > 0xffffU)
                        return (0);
                val |= (parts[0] << 24) | (parts[1] << 16);
                break;
 
        case 4:                         /* a.b.c.d -- 8.8.8.8 bits */
-               if (val > 0xff)
+               if (val > 0xffU)
                        return (0);
                val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
                break;
index 077916263f59ba8448b6642d011c8f041a8e63be..126fc9c8968a89fd0da45d0f137016c8a2f437db 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.1.2.2 2004/03/09 09:17:27 marka Exp $";
+static const char rcsid[] = "$Id: inet_cidr_ntop.c,v 1.1.2.3 2004/03/17 00:40:10 marka Exp $";
 #endif
 
 #include "port_before.h"
@@ -121,7 +121,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
        if (bits == -1)
                len = 4;
        else
-               for (len = 1, b = 1 ; b < 4; b++)
+               for (len = 1, b = 1 ; b < 4U; b++)
                        if (*(src + b))
                                len = b + 1;
 
@@ -130,7 +130,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
        if (len > bytes)
                bytes = len;
        b = decoct(src, bytes, dst, size);
-       if (b == 0)
+       if (b == 0U)
                goto emsgsize;
        dst += b;
        size -= b;
index f28ac6435203cd7af7d6faa1cf504e93344607df..6fe5f7b03b8758e436391e26027954041dbd65a2 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.2.2.2 2004/03/09 09:17:27 marka Exp $";
+static const char rcsid[] = "$Id: inet_cidr_pton.c,v 1.2.2.3 2004/03/17 00:40:11 marka Exp $";
 #endif
 
 #include "port_before.h"
@@ -98,7 +98,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
                        if (tmp > 255)
                                goto enoent;
                } while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
-               if (size-- == 0)
+               if (size-- == 0U)
                        goto emsgsize;
                *dst++ = (u_char) tmp;
                if (ch == '\0' || ch == '/')
@@ -133,7 +133,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
                goto enoent;
 
        /* Extend address to four octets. */
-       while (size-- > 0)
+       while (size-- > 0U)
                *dst++ = 0;
 
        *pbits = bits;
index 49ea023df901eb0af1c742a922eac2260ca7d156..1d20619b9922f45771f88778ed551bf896368771 100644 (file)
@@ -53,9 +53,9 @@ inet_makeaddr(net, host)
 {
        u_long addr;
 
-       if (net < 128)
+       if (net < 128U)
                addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
-       else if (net < 65536)
+       else if (net < 65536U)
                addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
        else if (net < 16777216L)
                addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
index e265b56e7950d2e1eb4b28bff28cd487aaa3bb64..44a6f92ce1c5c6f5a677e2da67f987bb09beb008 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: inet_net_pton.c,v 1.4.2.2 2004/03/09 09:17:27 marka Exp $";
+static const char rcsid[] = "$Id: inet_net_pton.c,v 1.4.2.3 2004/03/17 00:40:11 marka Exp $";
 #endif
 
 #include "port_before.h"
@@ -70,7 +70,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
            && isascii((unsigned char)(src[1]))
            && isxdigit((unsigned char)(src[1]))) {
                /* Hexadecimal: Eat nybble string. */
-               if (size <= 0)
+               if (size <= 0U)
                        goto emsgsize;
                dirty = 0;
                src++;  /* skip x or X. */
@@ -84,14 +84,14 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
                        else
                                tmp = (tmp << 4) | n;
                        if (++dirty == 2) {
-                               if (size-- <= 0)
+                               if (size-- <= 0U)
                                        goto emsgsize;
                                *dst++ = (u_char) tmp;
                                dirty = 0;
                        }
                }
                if (dirty) {  /* Odd trailing nybble? */
-                       if (size-- <= 0)
+                       if (size-- <= 0U)
                                goto emsgsize;
                        *dst++ = (u_char) (tmp << 4);
                }
@@ -108,7 +108,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
                                        goto enoent;
                        } while ((ch = *src++) != '\0' &&
                                 isascii(ch) && isdigit(ch));
-                       if (size-- <= 0)
+                       if (size-- <= 0U)
                                goto emsgsize;
                        *dst++ = (u_char) tmp;
                        if (ch == '\0' || ch == '/')
@@ -171,7 +171,7 @@ inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
        }
        /* Extend network to cover the actual mask. */
        while (bits > ((dst - odst) * 8)) {
-               if (size-- <= 0)
+               if (size-- <= 0U)
                        goto emsgsize;
                *dst++ = '\0';
        }
index 9090d135f51c23f7bdeef744b2d746c15009fa60..aaa50c8315781fee81c61246f4e8b0da5af7557f 100644 (file)
@@ -66,14 +66,14 @@ again:
                base = 16, cp++;
        while ((c = *cp) != 0) {
                if (isdigit((unsigned char)c)) {
-                       if (base == 8 && (c == '8' || c == '9'))
+                       if (base == 8U && (c == '8' || c == '9'))
                                return (INADDR_NONE);
                        val = (val * base) + (c - '0');
                        cp++;
                        digit = 1;
                        continue;
                }
-               if (base == 16 && isxdigit((unsigned char)c)) {
+               if (base == 16U && isxdigit((unsigned char)c)) {
                        val = (val << 4) +
                              (c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
                        cp++;
@@ -85,7 +85,7 @@ again:
        if (!digit)
                return (INADDR_NONE);
        if (*cp == '.') {
-               if (pp >= parts + 4 || val > 0xff)
+               if (pp >= parts + 4 || val > 0xffU)
                        return (INADDR_NONE);
                *pp++ = val, cp++;
                goto again;
@@ -94,7 +94,7 @@ again:
                return (INADDR_NONE);
        *pp++ = val;
        n = pp - parts;
-       if (n > 4)
+       if (n > 4U)
                return (INADDR_NONE);
        for (val = 0, i = 0; i < n; i++) {
                val <<= 8;
index 3997961df0bd49c790df9a3102f22466ca7c33f0..dbd30634792fb8b9f6ae04a55463ed7c694e757e 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns.c,v 1.1.2.1 2004/03/09 09:17:28 marka Exp $";
+static const char rcsid[] = "$Id: dns.c,v 1.1.2.2 2004/03/17 00:40:11 marka Exp $";
 #endif
 
 /*
@@ -118,7 +118,7 @@ dns_res_get(struct irs_acc *this) {
                dns_res_set(this, res, free);
        }
 
-       if ((dns->res->options & RES_INIT) == 0 &&
+       if ((dns->res->options & RES_INIT) == 0U &&
            res_ninit(dns->res) < 0)
                return (NULL);
 
index 15b5b17b1abc19c4c54c2bbe9d77fb11bf1f4cfc..8f52d61b6f4f6e77b95d44f97d5df51825ba40d6 100644 (file)
@@ -52,7 +52,7 @@
 /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.8 2004/03/09 09:17:28 marka Exp $";
+static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.9 2004/03/17 00:40:11 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /* Imports. */
@@ -386,7 +386,7 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
                q2->qtype = T_PTR;
                q2->answer = q2->qbuf.buf;
                q2->anslen = sizeof(q2->qbuf);
-               if ((pvt->res->options & RES_NO_NIBBLE2) != 0)
+               if ((pvt->res->options & RES_NO_NIBBLE2) != 0U)
                        q2->action = RESTGT_IGNORE;
                else
                        q2->action = RESTGT_AFTERFAILURE;
@@ -1149,7 +1149,7 @@ init(struct irs_ho *this) {
        
        if (!pvt->res && !ho_res_get(this))
                return (-1);
-       if (((pvt->res->options & RES_INIT) == 0) &&
+       if (((pvt->res->options & RES_INIT) == 0U) &&
            res_ninit(pvt->res) == -1)
                return (-1);
        return (0);
index 30d99001e7c1b79ee3518e1ae0165d59a9913456..6dad53fa894cf5c79a71d31eaf9b06d602b09e8f 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_nw.c,v 1.3.2.5 2004/03/09 09:17:28 marka Exp $";
+static const char rcsid[] = "$Id: dns_nw.c,v 1.3.2.6 2004/03/17 00:40:12 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /* Imports. */
@@ -587,7 +587,7 @@ init(struct irs_nw *this) {
        
        if (!pvt->res && !nw_res_get(this))
                return (-1);
-       if (((pvt->res->options & RES_INIT) == 0) &&
+       if (((pvt->res->options & RES_INIT) == 0U) &&
            res_ninit(pvt->res) == -1)
                return (-1);
        return (0);
index 97695be7959d40e1f6d1da7ee59af89f20ffac9e..54d1b143957211653122c8bc6cb7ed7a3b5778c2 100644 (file)
  */
 
 /*
- * $Id: dns_p.h,v 1.1.2.1 2004/03/09 09:17:28 marka Exp $
+ * $Id: dns_p.h,v 1.1.2.2 2004/03/17 00:40:12 marka Exp $
  */
 
 #ifndef _DNS_P_H_INCLUDED
 #define        _DNS_P_H_INCLUDED
 
-#define        maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0 || \
+#define        maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
                               (ok)(nm) != 0)
 #define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
 #define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
index 3f872dbbbbe7cfcffe45be351305dc5844c650de..d3898032322b485ded4dd58c3a3bd7a635d0cbd9 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: gen.c,v 1.3.2.1 2004/03/09 09:17:28 marka Exp $";
+static const char rcsid[] = "$Id: gen.c,v 1.3.2.2 2004/03/17 00:40:12 marka Exp $";
 #endif
 
 /*
@@ -175,7 +175,7 @@ gen_res_get(struct irs_acc *this) {
                gen_res_set(this, res, free);
        }
 
-       if (((irs->res->options & RES_INIT) == 0) && res_ninit(irs->res) < 0)
+       if (((irs->res->options & RES_INIT) == 0U) && res_ninit(irs->res) < 0)
                return (NULL);
 
        return (irs->res);
index 7bb245af2adf8da4042624015f21f9db17b6002f..56095f0fb9013c1a4fd3c59a81adbca0092379d4 100644 (file)
@@ -49,7 +49,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.2.1 2004/03/09 09:17:32 marka Exp $";
+static const char rcsid[] = "$Id: irpmarshall.c,v 1.3.2.2 2004/03/17 00:40:12 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 #if 0
@@ -508,7 +508,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
 
        /* gr_name field */
        name = NULL;
-       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
+       if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
                goto error;
        }
 
index fba52f745cd0fb1e2fc2c4d412733f23a13b436f..3f6db55d2c7bb78b5800deb13152950710b96171 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: irs_data.c,v 1.3.2.3 2004/03/09 09:17:32 marka Exp $";
+static const char rcsid[] = "$Id: irs_data.c,v 1.3.2.4 2004/03/17 00:40:13 marka Exp $";
 #endif
 
 #include "port_before.h"
@@ -169,7 +169,7 @@ net_data_create(const char *conf_file) {
                return (NULL);
        }
 
-       if ((net_data->res->options & RES_INIT) == 0 &&
+       if ((net_data->res->options & RES_INIT) == 0U &&
            res_ninit(net_data->res) == -1) {
                (*net_data->irs->close)(net_data->irs);
                memput(net_data, sizeof (struct net_data));
index a45bb38f40e53959bc97bbb9f37afae7e2ae273c..e14ed5224719db5176a0d8ddf9b0f1a4ed0555c6 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: lcl.c,v 1.1.2.1 2004/03/09 09:17:32 marka Exp $";
+static const char rcsid[] = "$Id: lcl.c,v 1.1.2.2 2004/03/17 00:40:13 marka Exp $";
 #endif
 
 /* Imports */
@@ -106,7 +106,7 @@ lcl_res_get(struct irs_acc *this) {
                lcl_res_set(this, res, free);
        }
 
-       if ((lcl->res->options & RES_INIT) == 0 &&
+       if ((lcl->res->options & RES_INIT) == 0U &&
            res_ninit(lcl->res) < 0)
                return (NULL);
 
index 06b5c8fe9d03fc5bd1392a8c503d4c512ff9804a..865566179a6697c75722903f4fdde481a8e91660 100644 (file)
@@ -52,7 +52,7 @@
 /* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: lcl_ho.c,v 1.1.2.1 2004/03/09 09:17:32 marka Exp $";
+static const char rcsid[] = "$Id: lcl_ho.c,v 1.1.2.2 2004/03/17 00:40:13 marka Exp $";
 #endif /* LIBC_SCCS and not lint */
 
 /* Imports. */
@@ -569,7 +569,7 @@ init(struct irs_ho *this) {
        
        if (!pvt->res && !ho_res_get(this))
                return (-1);
-       if (((pvt->res->options & RES_INIT) == 0) &&
+       if (((pvt->res->options & RES_INIT) == 0U) &&
            res_ninit(pvt->res) == -1)
                return (-1);
        return (0);
index c21189273b1add80891cd3b2c188ba5e8789286b..b31f785a84e6b3c45d1bcfbf35a724b3bc8a1651 100644 (file)
@@ -49,7 +49,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: lcl_nw.c,v 1.1.2.1 2004/03/09 09:17:33 marka Exp $";
+static const char rcsid[] = "$Id: lcl_nw.c,v 1.1.2.2 2004/03/17 00:40:13 marka Exp $";
 /* from getgrent.c 8.2 (Berkeley) 3/21/94"; */
 /* from BSDI Id: getgrent.c,v 2.8 1996/05/28 18:15:14 bostic Exp $     */
 #endif /* LIBC_SCCS and not lint */
@@ -364,7 +364,7 @@ init(struct irs_nw *this) {
        
        if (!pvt->res && !nw_res_get(this))
                return (-1);
-       if (((pvt->res->options & RES_INIT) == 0) &&
+       if (((pvt->res->options & RES_INIT) == 0U) &&
            res_ninit(pvt->res) == -1)
                return (-1);
        return (0);
index 2aab4fccd3774efc653298301fe317cb5294ff42..a21c73dd3106cfb92b917de062e536eb9879a680 100644 (file)
@@ -41,7 +41,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: base64.c,v 1.1.2.1 2004/03/09 09:17:34 marka Exp $";
+static const char rcsid[] = "$Id: base64.c,v 1.1.2.2 2004/03/17 00:40:13 marka Exp $";
 #endif /* not lint */
 
 #include "port_before.h"
@@ -138,7 +138,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
        u_char output[4];
        size_t i;
 
-       while (2 < srclength) {
+       while (2U < srclength) {
                input[0] = *src++;
                input[1] = *src++;
                input[2] = *src++;
@@ -162,7 +162,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
        }
     
        /* Now we worry about padding. */
-       if (0 != srclength) {
+       if (0U != srclength) {
                /* Get what's left. */
                input[0] = input[1] = input[2] = '\0';
                for (i = 0; i < srclength; i++)
@@ -179,7 +179,7 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize) {
                        return (-1);
                target[datalength++] = Base64[output[0]];
                target[datalength++] = Base64[output[1]];
-               if (srclength == 1)
+               if (srclength == 1U)
                        target[datalength++] = Pad64;
                else
                        target[datalength++] = Base64[output[2]];
index 0717319b82b2d2f62b449192a76161ad76d0de5e..f63636b4c580eb7939bfd122b19140fe71697799 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_clnt.c,v 1.4.2.2 2004/03/09 09:17:34 marka Exp $";
+static const char rcsid[] = "$Id: ctl_clnt.c,v 1.4.2.3 2004/03/17 00:40:14 marka Exp $";
 #endif /* not lint */
 
 /*
@@ -528,7 +528,7 @@ readable(evContext ev, void *uap, int fd, int evmask) {
                (*tran->donefunc)(ctx, tran->uap, ctx->inbuf.text,
                                  (done ? 0 : CTL_MORE));
                ctx->inbuf.used -= ((eos - ctx->inbuf.text) + 1);
-               if (ctx->inbuf.used == 0)
+               if (ctx->inbuf.used == 0U)
                        ctl_bufput(&ctx->inbuf);
                else
                        memmove(ctx->inbuf.text, eos + 1, ctx->inbuf.used);
index 32763858677413781c62bb9eb0e1ac7aabe00b58..deb461f7d01eb4a5de83196932ebd4d819323877 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_p.c,v 1.1.2.1 2004/03/09 09:17:34 marka Exp $";
+static const char rcsid[] = "$Id: ctl_p.c,v 1.1.2.2 2004/03/17 00:40:14 marka Exp $";
 #endif /* not lint */
 
 /*
@@ -78,7 +78,7 @@ int
 ctl_bufget(struct ctl_buf *buf, ctl_logfunc logger) {
        static const char me[] = "ctl_bufget";
 
-       REQUIRE(!allocated_p(*buf) && buf->used == 0);
+       REQUIRE(!allocated_p(*buf) && buf->used == 0U);
        buf->text = memget(MAX_LINELEN);
        if (!allocated_p(*buf)) {
                (*logger)(ctl_error, "%s: getmem: %s", me, strerror(errno));
index 584b7a771ed0f8993fd0188a1b62fda9b9a93a00..6d7f7278bb2f78aa275d5d3c433bfb1199489238 100644 (file)
@@ -1,5 +1,5 @@
 #if !defined(lint) && !defined(SABER)
-static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3.2.2 2004/03/09 09:17:35 marka Exp $";
+static const char rcsid[] = "$Id: ctl_srvr.c,v 1.3.2.3 2004/03/17 00:40:14 marka Exp $";
 #endif /* not lint */
 
 /*
@@ -604,7 +604,7 @@ ctl_readable(evContext lev, void *uap, int fd, int evmask) {
                        ctl_docommand(sess);
                }
                sess->inbuf.used -= ((eos - sess->inbuf.text) + 1);
-               if (sess->inbuf.used == 0)
+               if (sess->inbuf.used == 0U)
                        ctl_bufput(&sess->inbuf);
                else
                        memmove(sess->inbuf.text, eos + 1, sess->inbuf.used);
index de1cf6e92430f0797d350afa1b12728c5abce82a..9fb05f4c47b0a61ffad1f58214ddc717a480fb8d 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_streams.c,v 1.2.2.1 2004/03/09 09:17:35 marka Exp $";
+static const char rcsid[] = "$Id: ev_streams.c,v 1.2.2.2 2004/03/17 00:40:14 marka Exp $";
 #endif
 
 #include "port_before.h"
@@ -221,7 +221,7 @@ copyvec(evStream *str, const struct iovec *iov, int iocnt) {
 /* Pull off or truncate lead iovec(s). */
 static void
 consume(evStream *str, size_t bytes) {
-       while (bytes > 0) {
+       while (bytes > 0U) {
                if (bytes < (size_t)str->iovCur->iov_len) {
                        str->iovCur->iov_len -= bytes;
                        str->iovCur->iov_base = (void *)
index 02e3119b24ec01a2537d5ff20588b29f220735b0..764c88f0dc1fe13bd9d21db3f63d8a9c2a0a6100 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.2 2004/03/09 09:17:35 marka Exp $";
+static const char rcsid[] = "$Id: ev_timers.c,v 1.2.2.3 2004/03/17 00:40:15 marka Exp $";
 #endif
 
 /* Import. */
@@ -180,10 +180,10 @@ evSetTimer(evContext opaqueCtx,
                 (long)due.tv_sec, due.tv_nsec,
                 (long)inter.tv_sec, inter.tv_nsec);
 
-       if (due.tv_sec < 0 || due.tv_nsec < 0)
+       if (due.tv_sec < 0 || due.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
-       if (inter.tv_sec < 0 || inter.tv_nsec < 0)
+       if (inter.tv_sec < 0 || inter.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
        /* due={0,0} is a magic cookie meaning "now." */
@@ -254,6 +254,8 @@ evConfigTimer(evContext opaqueCtx,
        evTimer *timer = id.opaque;
        int result=0;
 
+       UNUSED(value);
+
        if (heap_element(ctx->timers, timer->index) != timer)
                EV_ERR(ENOENT);
 
@@ -283,10 +285,10 @@ evResetTimer(evContext opaqueCtx,
        if (heap_element(ctx->timers, timer->index) != timer)
                EV_ERR(ENOENT);
 
-       if (due.tv_sec < 0 || due.tv_nsec < 0)
+       if (due.tv_sec < 0 || due.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
-       if (inter.tv_sec < 0 || inter.tv_nsec < 0)
+       if (inter.tv_sec < 0 || inter.tv_nsec > BILLION)
                EV_ERR(EINVAL);
 
        old_due = timer->due;
index 59393aaa8fe690b73ac423596a9eb516a58dc484..a7b91096c9db922145702bc4013b351d9ba9b0f5 100644 (file)
@@ -24,7 +24,7 @@
 
 
 #if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: memcluster.c,v 1.3.2.2 2004/03/16 12:35:31 marka Exp $";
+static const char rcsid[] = "$Id: memcluster.c,v 1.3.2.3 2004/03/17 00:40:15 marka Exp $";
 #endif /* not lint */
 
 #include "port_before.h"
@@ -396,7 +396,7 @@ __memput_record(void *mem, size_t size, const char *file, int line) {
                free(mem);
 #endif
 
-               INSIST(stats[max_size].gets != 0);
+               INSIST(stats[max_size].gets != 0U);
                stats[max_size].gets--;
                return;
        }
index 9a31ee9c234f15f7052387a974e17b538fb2c471..59b73c993f24cca13667c8557f2ab81f48a9714f 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #ifndef lint
-static const char rcsid[] = "$Id: ns_print.c,v 1.3.2.3 2004/03/16 12:35:32 marka Exp $";
+static const char rcsid[] = "$Id: ns_print.c,v 1.3.2.4 2004/03/17 00:40:15 marka Exp $";
 #endif
 
 /* Import. */
@@ -145,7 +145,7 @@ ns_sprintrrf(const u_char *msg, size_t msglen,
        addlen(x, &buf, &buflen);
        len = SPRINTF((tmp, " %s %s", p_class(class), p_type(type)));
        T(addstr(tmp, len, &buf, &buflen));
-       if (rdlen == 0)
+       if (rdlen == 0U)
                return (buf - obuf);
        T(spaced = addtab(x + len, 16, spaced, &buf, &buflen));