From ad33995536d82b03fd299d6601b37ef878611a10 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sat, 17 Aug 2019 08:59:06 +0200 Subject: [PATCH] Nest: Assumption in rt-show for not-so-intuitive invariant. --- nest/rt-show.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nest/rt-show.c b/nest/rt-show.c index 5d1129790..0562ff536 100644 --- a/nest/rt-show.c +++ b/nest/rt-show.c @@ -106,6 +106,12 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d) byte ia[NET_MAX_TEXT_LENGTH+1]; struct ea_list *tmpa; struct channel *ec = d->tab->export_channel; + + /* The Clang static analyzer complains that ec may be NULL. + * It should be ensured to be not NULL by rt_show_prepare_tables() */ + if (d->export_mode) + ASSUME(ec); + int first = 1; int pass = 0; -- 2.47.2