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);
setup_logging(mctx, &log);
if (predecessor == NULL) {
+ /* cppcheck-suppress nullPointerRedundantCheck */
if (label == NULL) {
fatal("the key label was not specified");
}
isc_result_totext(ret));
}
+ /* cppcheck-suppress nullPointerRedundantCheck */
if (strchr(label, ':') == NULL) {
char *l;
int len;
label = l;
}
+ /* cppcheck-suppress nullPointerRedundantCheck */
if (algname == NULL) {
fatal("no algorithm specified");
}
r.base = algname;
+ /* cppcheck-suppress nullPointerRedundantCheck */
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS) {
}
if (ctx.predecessor == NULL && ctx.policy == NULL) {
+ /* cppcheck-suppress nullPointerRedundantCheck */
if (algname == NULL) {
fatal("no algorithm specified");
}
r.base = algname;
+ /* cppcheck-suppress nullPointerRedundantCheck */
r.length = strlen(algname);
ret = dns_secalg_fromtext(&ctx.alg, &r);
if (ret != ISC_R_SUCCESS) {
.sp
\fBdnssec\-importkey\fP reads a public DNSKEY record and generates a pair
of .key/.private files. The DNSKEY record may be read from an existing
-\&.key file, in which case a corresponding .private file will be
+.key file, in which case a corresponding .private file will be
generated, or it may be read from any other file or from the standard
input, in which case both .key and .private files will be generated.
.sp
dst_key_free(&state->zone_keys[i]);
}
- if (state != &mystate && state != NULL) {
+ if (state != &mystate) {
*statep = NULL;
state->magic = 0;
isc_mem_put(diff->mctx, state, sizeof(*state));
if (ctx->basic_blocks == NULL) {
more_basic_blocks(ctx);
}
+ INSIST(ctx->basic_blocks != NULL);
total_size = ctx->mem_target;
tmp = ctx->basic_blocks;
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".
*target = NULL;
- if (radix->head == NULL) {
+ node = radix->head;
+ if (node == NULL) {
return (ISC_R_NOTFOUND);
}
- node = radix->head;
addr = isc_prefix_touchar(prefix);
bitlen = prefix->bitlen;
- while (node->bit < bitlen) {
+ while (node != NULL && node->bit < bitlen) {
if (node->prefix) {
stack[cnt++] = node;
}
} else {
node = node->l;
}
-
- if (node == NULL) {
- break;
- }
}
- if (node && node->prefix) {
+ if (node != NULL && node->prefix) {
stack[cnt++] = node;
}
}
paddr = (uint8_t *)&caddr.type;
- if (addrbytes != 0U) {
+ if (addrbytes > 0U) {
memmove(paddr, isc_buffer_current(buf), addrbytes);
isc_buffer_forward(buf, addrbytes);
optlen -= addrbytes;