From 8934b81c69f43d81923133fba3989135692c9f34 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 11 Apr 2018 14:05:32 -0400 Subject: [PATCH] ospf6d: assert that we set a variable Assert that prefix_lsa was set. Suppresses clang-analyze warnings. Signed-off-by: Quentin Young --- ospf6d/ospf6_abr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index 01b8055b66..b895b5ad8b 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -786,6 +786,9 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) /* (3) if the prefix is equal to an active configured address range */ /* or if the NU bit is set in the prefix */ if (lsa->header->type == htons(OSPF6_LSTYPE_INTER_PREFIX)) { + /* must have been set in previous block */ + assert(prefix_lsa); + range = ospf6_route_lookup(&prefix, oa->range_table); if (range) { if (is_debug) -- 2.39.5