From ff2c10cced64e0a3eddffd1e465aa94c7afa816e Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Tue, 16 Apr 2019 15:34:22 +1000 Subject: [PATCH] add assertions to silence clang false positive (cherry picked from commit bed9ad79badb28cdccbe7937da111ce35eb7570c) --- lib/ns/query.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ns/query.c b/lib/ns/query.c index 11accf9b37..93c532c529 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -6480,11 +6480,15 @@ query_checkrpz(query_ctx_t *qctx, isc_result_t result) { */ static isc_result_t query_rpzcname(query_ctx_t *qctx, dns_name_t *cname) { - ns_client_t *client = qctx->client; + ns_client_t *client; dns_fixedname_t prefix, suffix; unsigned int labels; isc_result_t result; + REQUIRE(qctx != NULL && qctx->client != NULL); + + client = qctx->client; + CTRACE(ISC_LOG_DEBUG(3), "query_rpzcname"); labels = dns_name_countlabels(cname);