helper/command: fix check on value returned by jim API
authorAntonio Borneo <borneo.antonio@gmail.com>
Tue, 12 May 2020 22:47:17 +0000 (00:47 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sun, 24 May 2020 20:36:38 +0000 (21:36 +0100)
commit80e8b019b0757ae895783dc7b8eaf424a6f6428c
tree9820ddbcf6f1527efe92a947693fc164a040711e
parent3008756604b8b7a3811948cf66ed7e587efac349
helper/command: fix check on value returned by jim API

Either Jim_CreateCommand() and register_command_handler() return
the jim error code JIM_OK/JIM_ERR.

Fix the check and the initialization of retval.

Change-Id: I3073c66764670128706ad979a43bb3edbbeb0ab0
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5661
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Tested-by: jenkins
src/helper/command.c