From: Maria Matejka Date: Sat, 17 Aug 2019 06:59:06 +0000 (+0200) Subject: Nest: Assumption in rt-show for not-so-intuitive invariant. X-Git-Tag: v2.0.8~77^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbe49ae569534d0cf7ff226d19e729dcc764e606;p=thirdparty%2Fbird.git Nest: Assumption in rt-show for not-so-intuitive invariant. --- diff --git a/nest/rt-show.c b/nest/rt-show.c index 3431293a1..bd0df9ee6 100644 --- a/nest/rt-show.c +++ b/nest/rt-show.c @@ -104,6 +104,12 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d) rte *e, *ee; byte ia[NET_MAX_TEXT_LENGTH+1]; 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;