Skip to content

Commit

Permalink
[9.18] fix: test: Various coccinelle fixes
Browse files Browse the repository at this point in the history
Backport of MR !9836

Merge branch 'backport-mnowak/cocci-more-set-if-not-null-changes-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9917
  • Loading branch information
Mno-hime committed Dec 13, 2024
2 parents 1d3f2cf + 6db006a commit 333834e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions tests/libtest/ns.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,15 +400,9 @@ extract_qctx(void *arg, void *data, isc_result_t *resultp) {
* gets unwound.
*/
qctx = isc_mem_get(mctx, sizeof(*qctx));
if (qctx != NULL) {
memmove(qctx, (query_ctx_t *)arg, sizeof(*qctx));
}
memmove(qctx, (query_ctx_t *)arg, sizeof(*qctx));

qctxp = (query_ctx_t **)data;
/*
* If memory allocation failed, the supplied pointer will simply be set
* to NULL. We rely on the user of this hook to react properly.
*/
*qctxp = qctx;
*resultp = ISC_R_UNSET;

Expand Down

0 comments on commit 333834e

Please sign in to comment.