From ac0798db359eb0de2eae1a54b63dfaa9534984c8 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 26 Jul 2016 10:30:50 -0400 Subject: Fix coverity warnings Change-Id: I37131f2d814a608fe9098daff83ff395f7ce99d7 Signed-off-by: Dave Barach --- vlib/vlib/cli.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vlib') 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)); -- cgit 1.2.3-korg