summaryrefslogtreecommitdiffstats
path: root/vlib
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-07-26 10:30:50 -0400
committerDave Barach <dave@barachs.net>2016-07-26 10:31:05 -0400
commitac0798db359eb0de2eae1a54b63dfaa9534984c8 (patch)
tree6ee4810cbed91cb517629f5132a9872882439e4d /vlib
parent0f1c29c9d45edcc2d226a8e519db3e56888e3181 (diff)
Fix coverity warnings
Change-Id: I37131f2d814a608fe9098daff83ff395f7ce99d7 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vlib')
-rw-r--r--vlib/vlib/cli.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vlib/vlib/cli.c b/vlib/vlib/cli.c
index 79db99f9632..5e959a78bf5 100644
--- a/vlib/vlib/cli.c
+++ b/vlib/vlib/cli.c
@@ -853,8 +853,11 @@ add_sub_command (vlib_cli_main_t * cm, uword parent_index, uword child_index)
q = hash_get_mem (cm->parse_rule_index_by_name, sub_name);
if (!q)
- clib_error ("reference to unknown rule `%%%v' in path `%v'",
- sub_name, c->path);
+ {
+ clib_error ("reference to unknown rule `%%%v' in path `%v'",
+ sub_name, c->path);
+ return;
+ }
hash_set_mem (p->sub_rule_index_by_name, sub_name,
vec_len (p->sub_rules));