From 5acb74d7daee0fc5c501a82e604ec2abdb3cf88a Mon Sep 17 00:00:00 2001 From: Sunny Kumar Date: Fri, 10 Aug 2018 00:57:09 +0530 Subject: cli : fix few coverity in cli This patch fixes DEADCODE and FORWARD_NULL. CID : 1124495, 1124380, 1124381 Change-Id: I79992e396dbcb1bfe6cd0614d49a8da3f67d648d updates: bz#789278 Signed-off-by: Sunny Kumar --- cli/src/cli-rl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cli/src/cli-rl.c') diff --git a/cli/src/cli-rl.c b/cli/src/cli-rl.c index 1bb9bf07c51..215fbebb998 100644 --- a/cli/src/cli-rl.c +++ b/cli/src/cli-rl.c @@ -295,6 +295,8 @@ cli_rl_autocomplete_prepare (struct cli_state *state, const char *text) if (!word) goto out; + if (!tokens) + return 0; matches = cli_rl_get_matches (state, word, token); state->matches = matches; -- cgit