target: do not cast NULL in assignment 40/6540/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 4 Sep 2021 21:22:27 +0000 (23:22 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 18 Sep 2021 15:26:14 +0000 (15:26 +0000)
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
src/target/target.c

index 49f205a975cf27b1d46e1ff39066511b7def1554..6571e9c6fd05244f9f8e8184015865e3263735ec 100644 (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;

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)