diff options
author | Dave Barach <dave@barachs.net> | 2021-06-21 10:31:35 -0400 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2021-06-21 18:45:11 +0000 |
commit | 0a4b9ad14887f7dc4de9240f31a596c1479b1dfa (patch) | |
tree | 8c00a3c2dcb01b2ef2433855bbf3063838b9128e /src | |
parent | 1cb93827f92709c19f5051945c3c2825da5b640a (diff) |
vlib: fix coverity warning
Type: fix
Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib563e2c09d46cc26fb983ffde3d5fcb88166f6a5
(cherry picked from commit bfb9a66fab43e935772806e9d2f6b0ecf7146d67)
Diffstat (limited to 'src')
-rw-r--r-- | src/vlib/cli.c | 3 |
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; |