Skip to content

Commit 4fb20c4

Browse files
Jakub Rzeszutkonashif
Jakub Rzeszutko
authored andcommitted
shell: fix coverity issue
Fixing a case where variable could be used without an initialization. Signed-off-by: Jakub Rzeszutko <[email protected]>
1 parent bc5a3f2 commit 4fb20c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subsys/shell/shell.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,9 @@ static int execute(const struct shell *shell)
608608
return -ENOEXEC;
609609
}
610610

611+
/* Initialize help variable */
612+
help_entry.help = NULL;
613+
611614
/* Below loop is analyzing subcommands of found root command. */
612615
while (true) {
613616
if (cmd_lvl >= argc) {

0 commit comments

Comments
 (0)