From: Dave Barach Date: Mon, 21 Jun 2021 14:31:35 +0000 (-0400) Subject: vlib: fix coverity warning X-Git-Tag: v22.02-rc0~290 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F32816%2F2;p=vpp.git vlib: fix coverity warning Type: fix Signed-off-by: Dave Barach Change-Id: Ib563e2c09d46cc26fb983ffde3d5fcb88166f6a5 --- 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;