From 8b7e644b659b9361922ec4879be2e57bc74c945a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 24 Apr 2020 12:24:42 +0200 Subject: [PATCH] lib/cache: shut up linters It makes no sense to run produce/consume with either of these NULL. --- lib/cache/peek.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/cache/peek.c b/lib/cache/peek.c index 0d66bb630..dc7cd7fe3 100644 --- a/lib/cache/peek.c +++ b/lib/cache/peek.c @@ -79,6 +79,8 @@ static int nsec_p_ttl(knot_db_val_t entry, const uint32_t timestamp, int32_t *ne static uint8_t get_lowest_rank(const struct kr_query *qry, const knot_dname_t *name, const uint16_t type) { + /* Shut up linters. */ + if (unlikely(!qry || !qry->request)) abort(); /* TODO: move rank handling into the iterator (DNSSEC_* flags)? */ const bool allow_unverified = knot_wire_get_cd(qry->request->qsource.packet->wire) || qry->flags.STUB; -- 2.47.3