* 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>
struct in6_addr in6;
cmd = option[0];
- if (strlen(option) > 1) {
+ if (strlen(option) > 1U) {
value_from_next = ISC_FALSE;
value = &option[1];
} else {
* 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>
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;
* 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>
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);
* 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>
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);
* 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>
#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
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;
}
* 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>
"#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;
}
* 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>
count = 256;
nlen--;
len = sprintf(num, "%u", count); /* XXX */
- INSIST(len <= 4);
+ INSIST(len <= 4U);
bytes = count / 8;
if (count % 8 != 0)
bytes++;
count = 256;
nlen--;
len = sprintf(num, "%u", count); /* XXX */
- INSIST(len <= 4);
+ INSIST(len <= 4U);
bytes = count / 8;
if (count % 8 != 0)
bytes++;
* 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>
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)
*/
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));
/*
* 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 */
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
* 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 */
*/
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));
* 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 */
*/
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));
* 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 */
*/
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;
/*
*/
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;
altitude = uint32_fromregion(&sr);
isc_region_consume(&sr, 4);
- if (altitude < 10000000) {
+ if (altitude < 10000000U) {
below = ISC_TRUE;
altitude = 10000000 - altitude;
} else {
* 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 */
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));
* 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 */
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));
* 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 */
*/
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));
* 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.
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
* Other Data.
*/
REQUIRE(n <= sr.length);
- if (n != 0) {
+ if (n != 0U) {
dr = sr;
dr.length = n;
if ((tctx->flags & DNS_STYLEFLAG_MULTILINE) != 0)
* 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 */
*/
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;
* 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 */
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));
* 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 */
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
* 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 */
*/
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));
* 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 */
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
*/
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
- if (token.value.as_ulong > 0xffff)
+ if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
RETERR(uint16_tobuffer(token.value.as_ulong, target));
/*
* 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>
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, "/");
}
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);
* 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>
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)
* 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>
isc_buffer_t buffer;
REQUIRE(buf != NULL);
- REQUIRE(length > 1);
+ REQUIRE(length > 1U);
/*
* Leave space for terminating '\0'.
* 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
addr = (unsigned long)p;
buf = p;
- if ((addr & 0x03) != 0) {
+ if ((addr & 0x03U) != 0U) {
val = 0;
switch (len) {
case 3:
* 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>
*/
REQUIRE(lexp != NULL && *lexp == NULL);
- REQUIRE(max_token > 0);
+ REQUIRE(max_token > 0U);
lex = isc_mem_get(mctx, sizeof *lex);
if (lex == NULL)
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--;
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--;
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';
* 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>
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--;
}
}
static void *
default_memalloc(void *arg, size_t size) {
UNUSED(arg);
- if (size == 0)
+ if (size == 0U)
size = 1;
return (malloc(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;
if (ctx->stats[i].gets != 0)
print_active(ctx, stderr);
#endif
- INSIST(ctx->stats[i].gets == 0);
+ INSIST(ctx->stats[i].gets == 0U);
}
}
#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);
* 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)
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) ? ">=" : " ",
isc_mempool_t *mpctx;
REQUIRE(VALID_CONTEXT(mctx));
- REQUIRE(size > 0);
+ REQUIRE(size > 0U);
REQUIRE(mpctxp != NULL && *mpctxp == NULL);
/*
* 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>
#include <isc/util.h>
#ifndef THREAD_MINSTACKSIZE
-#define THREAD_MINSTACKSIZE (64 * 1024)
+#define THREAD_MINSTACKSIZE (64U * 1024)
#endif
isc_result_t
* 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 */
* XXXDCL Could automatically allocate memory if dirname == NULL.
*/
REQUIRE(dirname != NULL);
- REQUIRE(length > 0);
+ REQUIRE(length > 0U);
cwd = getcwd(dirname, length);
* 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>
buffer = ISC_LIST_NEXT(buffer, link);
}
- INSIST(skip_count == 0);
+ INSIST(skip_count == 0U);
config:
msg->msg_iov = iov;
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);
}
buffer = ISC_LIST_NEXT(buffer, link);
if (buffer == NULL) {
- INSIST(actual_count == 0);
+ INSIST(actual_count == 0U);
}
}
* 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>
* 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;
(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
* 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>
* the placeholder length too. Adjust and
* emit.
*/
- INSIST(len >= 4);
+ INSIST(len >= 4U);
len -= 4;
PUT32(len, lenp);
} else if (isccc_sexpr_listp(elt)) {
* '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);
}
ks = isccc_sexpr_tostring(k);
v = ISCCC_SEXPR_CDR(kv);
len = strlen(ks);
- INSIST(len <= 255);
+ INSIST(len <= 255U);
/*
* Emit the key name.
*/
* 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>
}
}
if ((flags & V4PREFIXOK) != 0 &&
- strlen(s) <= 15) {
+ strlen(s) <= 15U) {
char buf[64];
int i;
"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);
* 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>
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));
}
* 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;
* 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>
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);
}
* 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.
}
proto = (flags & NI_DGRAM) ? "udp" : "tcp";
- if (serv == NULL || servlen == 0) {
+ if (serv == NULL || servlen == 0U) {
/*
* Caller does not want service.
*/
}
#endif
- if (host == NULL || hostlen == 0) {
+ if (host == NULL || hostlen == 0U) {
/*
* What should we do?
*/
* 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>
static void *
sane_malloc(size_t size) {
- if (size == 0)
+ if (size == 0U)
size = 1;
return (malloc(size));
}
* 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.
char *p = buffer;
REQUIRE(buffer != NULL);
- REQUIRE(size > 0);
+ REQUIRE(size > 0U);
*p = '\0';
char *p;
REQUIRE(str != NULL);
- REQUIRE(strlen(str) > 0);
+ REQUIRE(strlen(str) > 0U);
p = CTXMALLOC(strlen(str) + 1);
if (p != NULL)
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);
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);
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);
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. */
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. */
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) {
confdata = &ctx->confdata;
REQUIRE(filename != NULL);
- REQUIRE(strlen(filename) > 0);
+ REQUIRE(strlen(filename) > 0U);
REQUIRE(confdata != NULL);
errno = 0;
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);
#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>
* 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;
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;
* 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>
}
}
*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);
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);
}
/*