shell: fix coverity issue

Fixing a case where variable could be used without an initialization.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
This commit is contained in:
Jakub Rzeszutko 2019-03-04 11:41:07 +01:00 committed by Anas Nashif
commit 4fb20c40a1

View file

@ -608,6 +608,9 @@ static int execute(const struct shell *shell)
return -ENOEXEC;
}
/* Initialize help variable */
help_entry.help = NULL;
/* Below loop is analyzing subcommands of found root command. */
while (true) {
if (cmd_lvl >= argc) {