diff --git a/CHANGES b/CHANGES index 4a9dae72c2..ff86c43287 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ --- 9.11.0rc1 released --- +4458. [cleanup] Update assertions to be more correct, and also remove + use of a reserved word. [RT #43090] + 4457. [maint] Added AAAA (2001:500:a8::e) for E.ROOT-SERVERS.NET. 4456. [doc] Add DOCTYPE and lang attribute to tags. diff --git a/lib/dns/name.c b/lib/dns/name.c index 2f65357e80..eb3190b74e 100644 --- a/lib/dns/name.c +++ b/lib/dns/name.c @@ -105,17 +105,17 @@ static unsigned char maptolower[] = { #define CONVERTTOASCII(c) #define CONVERTFROMASCII(c) -#define INIT_OFFSETS(name, var, default) \ - if (name->offsets != NULL) \ - var = name->offsets; \ +#define INIT_OFFSETS(name, var, default_offsets) \ + if ((name)->offsets != NULL) \ + var = (name)->offsets; \ else \ - var = default; + var = (default_offsets); -#define SETUP_OFFSETS(name, var, default) \ - if (name->offsets != NULL) \ - var = name->offsets; \ +#define SETUP_OFFSETS(name, var, default_offsets) \ + if ((name)->offsets != NULL) \ + var = (name)->offsets; \ else { \ - var = default; \ + var = (default_offsets); \ set_offsets(name, var, NULL); \ } diff --git a/lib/isc/hash.c b/lib/isc/hash.c index 565f1ce308..a9c5992c58 100644 --- a/lib/isc/hash.c +++ b/lib/isc/hash.c @@ -439,7 +439,7 @@ isc_hash_function(const void *data, size_t length, const unsigned char *bp; const unsigned char *be; - INSIST(data == NULL || length > 0); + REQUIRE(length == 0 || data != NULL); RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) == ISC_R_SUCCESS); hval = ISC_UNLIKELY(previous_hashp != NULL) ? @@ -506,7 +506,7 @@ isc_hash_function_reverse(const void *data, size_t length, const unsigned char *bp; const unsigned char *be; - INSIST(data == NULL || length > 0); + REQUIRE(length == 0 || data != NULL); RUNTIME_CHECK(isc_once_do(&fnv_once, fnv_initialize) == ISC_R_SUCCESS); hval = ISC_UNLIKELY(previous_hashp != NULL) ?