summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2021-06-21 10:31:35 -0400
committerDave Wallace <dwallacelf@gmail.com>2021-06-21 18:23:08 +0000
commitbfb9a66fab43e935772806e9d2f6b0ecf7146d67 (patch)
tree26adafa13cd8dd3d6581bdd5a56df2a2dfa5983a /src
parentd4721b2152b245558f5753a60d909b5b233af493 (diff)
vlib: fix coverity warning
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib563e2c09d46cc26fb983ffde3d5fcb88166f6a5
Diffstat (limited to 'src')
-rw-r--r--src/vlib/cli.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vlib/cli.c b/src/vlib/cli.c
index cad105f17c6..a00ae6245f9 100644
--- a/src/vlib/cli.c
+++ b/src/vlib/cli.c
@@ -1224,6 +1224,9 @@ add_sub_command (vlib_cli_main_t * cm, uword parent_index, uword child_index)
vec_add (sub_name, c->path + l + 1, vec_len (c->path) - (l + 1));
}
+ /* "Can't happen," check mainly to shut up coverity */
+ ALWAYS_ASSERT (sub_name != 0);
+
if (sub_name[0] == '%')
{
uword *q;