helper: with pointers, use NULL instead of 0

Don't compare pointers with 0, use NULL when needed.
Don't assign pointer to 0, use NULL.
Don't pass 0 ad pointer argument, pass NULL.

Detected through 'sparse' tool.

Change-Id: I3f867cb9c0903f6e396311e7b3970ee5fb3a4231
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/7597
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2023-04-09 00:16:28 +02:00
parent 9dc1d90f64
commit cd44c6cf83
3 changed files with 8 additions and 8 deletions

View File

@@ -582,7 +582,7 @@ int command_run_line(struct command_context *context, char *line)
Jim_DeleteAssocData(interp, "retval");
retcode = Jim_SetAssocData(interp, "retval", NULL, &retval);
if (retcode == JIM_OK) {
retcode = Jim_Eval_Named(interp, line, 0, 0);
retcode = Jim_Eval_Named(interp, line, NULL, 0);
Jim_DeleteAssocData(interp, "retval");
}