Commit 4ba6b6a7 authored by Mark Andrews's avatar Mark Andrews
Browse files

silence compiler warnings

parent 497beda3
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: master.c,v 1.156 2005/07/12 01:00:15 marka Exp $ */
/* $Id: master.c,v 1.157 2005/08/23 04:05:49 marka Exp $ */
/*! \file */
......@@ -2017,7 +2017,7 @@ read_and_check(isc_boolean_t do_read, isc_buffer_t *buffer,
return (ISC_R_SUCCESS);
}
isc_result_t
static isc_result_t
load_raw(dns_loadctx_t *lctx) {
isc_result_t result = ISC_R_SUCCESS;
isc_boolean_t done = ISC_FALSE;
......
......@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: a_1.c,v 1.3 2005/06/05 00:01:54 marka Exp $ */
/* $Id: a_1.c,v 1.4 2005/08/23 04:05:49 marka Exp $ */
/* by Bjorn.Victor@it.uu.se, 2005-05-07 */
/* Based on generic/soa_6.c and generic/mx_15.c */
......@@ -58,7 +58,7 @@ fromtext_ch_a(ARGS_FROMTEXT) {
/* 16-bit octal address */
RETERR(isc_lex_getoctaltoken(lexer, &token, ISC_FALSE));
if (token.value.as_ulong > 0xffff)
if (token.value.as_ulong > 0xffffU)
RETTOK(ISC_R_RANGE);
return (uint16_tobuffer(token.value.as_ulong, target));
}
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: mem.c,v 1.123 2005/07/12 01:00:18 marka Exp $ */
/* $Id: mem.c,v 1.124 2005/08/23 04:05:50 marka Exp $ */
/*! \file */
......@@ -319,7 +319,7 @@ quantize(size_t size) {
* byte boundaries.
*/
if (size == 0)
if (size == 0U)
return (ALIGNMENT_SIZE);
return ((size + ALIGNMENT_SIZE - 1) & (~(ALIGNMENT_SIZE - 1)));
}
......@@ -340,7 +340,7 @@ more_basic_blocks(isc_mem_t *ctx) {
* Did we hit the quota for this context?
*/
increment = NUM_BASIC_BLOCKS * ctx->mem_target;
if (ctx->quota != 0 && ctx->total + increment > ctx->quota)
if (ctx->quota != 0U && ctx->total + increment > ctx->quota)
return (ISC_FALSE);
INSIST(ctx->basic_table_count <= ctx->basic_table_size);
......@@ -441,7 +441,7 @@ more_frags(isc_mem_t *ctx, size_t new_size) {
* Add the remaining fragment of the basic block to a free list.
*/
total_size = rmsize(total_size);
if (total_size > 0) {
if (total_size > 0U) {
((element *)next)->next = ctx->freelists[total_size];
ctx->freelists[total_size] = (element *)next;
ctx->stats[total_size].freefrags++;
......@@ -465,7 +465,7 @@ mem_getunlocked(isc_mem_t *ctx, size_t size) {
/*
* memget() was called on something beyond our upper limit.
*/
if (ctx->quota != 0 && ctx->total + size > ctx->quota) {
if (ctx->quota != 0U && ctx->total + size > ctx->quota) {
ret = NULL;
goto done;
}
......@@ -549,7 +549,7 @@ mem_putunlocked(isc_mem_t *ctx, void *mem, size_t size) {
memset(mem, 0xde, size); /* Mnemonic for "dead". */
#endif
(ctx->memfree)(ctx->arg, mem);
INSIST(ctx->stats[ctx->max_size].gets != 0);
INSIST(ctx->stats[ctx->max_size].gets != 0U);
ctx->stats[ctx->max_size].gets--;
INSIST(size <= ctx->total);
ctx->inuse -= size;
......@@ -576,7 +576,7 @@ mem_putunlocked(isc_mem_t *ctx, void *mem, size_t size) {
* max. size (max_size) ends up getting recorded as a call to
* max_size.
*/
INSIST(ctx->stats[size].gets != 0);
INSIST(ctx->stats[size].gets != 0U);
ctx->stats[size].gets--;
ctx->stats[new_size].freefrags++;
ctx->inuse -= new_size;
......@@ -763,7 +763,7 @@ isc_mem_createx2(size_t init_max_size, size_t target_size,
memset(ctx->stats, 0, (ctx->max_size + 1) * sizeof(struct stats));
if ((flags & ISC_MEMFLAG_INTERNAL) != 0) {
if (target_size == 0)
if (target_size == 0U)
ctx->mem_target = DEF_MEM_TARGET;
else
ctx->mem_target = target_size;
......@@ -1192,7 +1192,7 @@ isc_mem_stats(isc_mem_t *ctx, FILE *out) {
(i == ctx->max_size) ? ">=" : " ",
(unsigned long) i, s->totalgets, s->gets);
if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0 &&
(s->blocks != 0 || s->freefrags != 0))
(s->blocks != 0U || s->freefrags != 0U))
fprintf(out, " (%lu bl, %lu ff)",
s->blocks, s->freefrags);
fputc('\n', out);
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: string.c,v 1.15 2005/06/19 22:56:03 marka Exp $ */
/* $Id: string.c,v 1.16 2005/08/23 04:05:50 marka Exp $ */
/*! \file */
......@@ -96,7 +96,7 @@ isc_string_touint64(char *source, char **end, int base) {
isc_result_t
isc_string_copy(char *target, size_t size, const char *source) {
REQUIRE(size > 0);
REQUIRE(size > 0U);
if (strlcpy(target, source, size) >= size) {
memset(target, ISC_STRING_MAGIC, size);
......@@ -110,7 +110,7 @@ isc_string_copy(char *target, size_t size, const char *source) {
void
isc_string_copy_truncate(char *target, size_t size, const char *source) {
REQUIRE(size > 0);
REQUIRE(size > 0U);
strlcpy(target, source, size);
......@@ -119,7 +119,7 @@ isc_string_copy_truncate(char *target, size_t size, const char *source) {
isc_result_t
isc_string_append(char *target, size_t size, const char *source) {
REQUIRE(size > 0);
REQUIRE(size > 0U);
REQUIRE(strlen(target) < size);
if (strlcat(target, source, size) >= size) {
......@@ -134,7 +134,7 @@ isc_string_append(char *target, size_t size, const char *source) {
void
isc_string_append_truncate(char *target, size_t size, const char *source) {
REQUIRE(size > 0);
REQUIRE(size > 0U);
REQUIRE(strlen(target) < size);
strlcat(target, source, size);
......@@ -147,7 +147,7 @@ isc_string_printf(char *target, size_t size, const char *format, ...) {
va_list args;
size_t n;
REQUIRE(size > 0);
REQUIRE(size > 0U);
va_start(args, format);
n = vsnprintf(target, size, format, args);
......@@ -168,7 +168,7 @@ isc_string_printf_truncate(char *target, size_t size, const char *format, ...) {
va_list args;
size_t n;
REQUIRE(size > 0);
REQUIRE(size > 0U);
va_start(args, format);
n = vsnprintf(target, size, format, args);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment