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 <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/6540
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Tested-by: jenkins
This commit is contained in:
Antonio Borneo 2021-09-04 23:22:27 +02:00
parent 79800db98a
commit 73c6416799
1 changed files with 4 additions and 4 deletions

View File

@ -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;