From bfb9a66fab43e935772806e9d2f6b0ecf7146d67 Mon Sep 17 00:00:00 2001
From: Dave Barach <dave@barachs.net>
Date: Mon, 21 Jun 2021 10:31:35 -0400
Subject: vlib: fix coverity warning

Type: fix

Signed-off-by: Dave Barach <dave@barachs.net>
Change-Id: Ib563e2c09d46cc26fb983ffde3d5fcb88166f6a5
---
 src/vlib/cli.c | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src')

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;
-- 
cgit