summaryrefslogtreecommitdiff
path: root/nest
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2019-08-17 08:59:06 +0200
committerMaria Matejka <mq@ucw.cz>2020-05-01 15:19:12 +0200
commitbbe49ae569534d0cf7ff226d19e729dcc764e606 (patch)
tree1857dbf8a24695b6e48fc682c6d2bb7a56e55d2c /nest
parenta08853a26989d343c507a41257dedcdea3befd73 (diff)
Nest: Assumption in rt-show for not-so-intuitive invariant.
Diffstat (limited to 'nest')
-rw-r--r--nest/rt-show.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nest/rt-show.c b/nest/rt-show.c
index 3431293a..bd0df9ee 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;