This is an automated email from Gerrit. "Antonio Borneo <[email protected]>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/6540
-- gerrit commit ccb3f49e29b22a7c9d9b9b0af70358c567ecfaaa Author: Antonio Borneo <[email protected]> Date: Sat Sep 4 23:22:27 2021 +0200 target: do not cast NULL in assignment NULL is defined as 'void *'. There is no need to cast NULL while assigning it to a pointer. Change-Id: Ibaf18e5d47329707ec9c1c184cd4bba2e8e702ff Signed-off-by: Antonio Borneo <[email protected]> diff --git a/src/target/target.c b/src/target/target.c index 49f205a97..6571e9c6f 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -5978,10 +5978,10 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv) int i; const char *targetname; int retval, len; - struct target *target = (struct target *) NULL; + struct target *target = NULL; struct target_list *head, *curr, *new; - curr = (struct target_list *) NULL; - head = (struct target_list *) NULL; + curr = NULL; + head = NULL; retval = 0; LOG_DEBUG("%d", argc); @@ -5998,7 +5998,7 @@ static int jim_target_smp(Jim_Interp *interp, int argc, Jim_Obj *const *argv) if (target) { new = malloc(sizeof(struct target_list)); new->target = target; - new->next = (struct target_list *)NULL; + new->next = NULL; if (!head) { head = new; curr = head; --
