mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 11:02:05 -04:00
Add INSIST's to silence cppcheck warnings
This commit is contained in:
parent
ee135d8946
commit
0cf25d7f38
2 changed files with 3 additions and 0 deletions
|
|
@ -1494,6 +1494,7 @@ save_opt(dig_lookup_t *lookup, char *code, char *value) {
|
|||
if (lookup->ednsopts == NULL) {
|
||||
cloneopts(lookup, NULL);
|
||||
}
|
||||
INSIST(lookup->ednsopts != NULL);
|
||||
|
||||
if (lookup->ednsopts[lookup->ednsoptscnt].value != NULL) {
|
||||
isc_mem_free(mctx, lookup->ednsopts[lookup->ednsoptscnt].value);
|
||||
|
|
|
|||
|
|
@ -445,6 +445,7 @@ more_frags(isc__mem_t *ctx, size_t new_size) {
|
|||
if (ctx->basic_blocks == NULL) {
|
||||
more_basic_blocks(ctx);
|
||||
}
|
||||
INSIST(ctx->basic_blocks != NULL);
|
||||
|
||||
total_size = ctx->mem_target;
|
||||
tmp = ctx->basic_blocks;
|
||||
|
|
@ -516,6 +517,7 @@ mem_getunlocked(isc__mem_t *ctx, size_t size) {
|
|||
if (ctx->freelists[new_size] == NULL) {
|
||||
more_frags(ctx, new_size);
|
||||
}
|
||||
INSIST(ctx->freelists[new_size] != NULL);
|
||||
|
||||
/*
|
||||
* The free list uses the "rounded-up" size "new_size".
|
||||
|
|
|
|||
Loading…
Reference in a new issue