]> git.puffer.fish Git - matthieu/frr.git/commitdiff
eigrpd, isisd, lib, ospfd: no effect (cppcheck)
authorpaco <paco@voltanet.io>
Tue, 19 Jun 2018 08:17:03 +0000 (10:17 +0200)
committerpaco <paco@voltanet.io>
Tue, 19 Jun 2018 08:19:05 +0000 (10:19 +0200)
Assignment of function parameter has no effect outside the function.

Signed-off-by: F. Aragon <paco@voltanet.io>
eigrpd/eigrp_packet.c
isisd/isis_adjacency.c
lib/frr_pthread.c
ospfd/ospf_packet.c

index 59864532cf9fde511ae9786a93547276ad6243df..fab21e52019b6d9cda10e61dd1236849ff691b92 100644 (file)
@@ -944,8 +944,6 @@ void eigrp_packet_free(struct eigrp_packet *ep)
        THREAD_OFF(ep->t_retrans_timer);
 
        XFREE(MTYPE_EIGRP_PACKET, ep);
-
-       ep = NULL;
 }
 
 /* EIGRP Header verification. */
index 81495d0a797e86c4fba6afe08456f86b02dc67eb..4b3d78421e8cf3a451b6c22feef551d3bd274376 100644 (file)
@@ -288,7 +288,6 @@ void isis_adj_state_change(struct isis_adjacency *adj,
                if (del)
                        isis_delete_adj(adj);
 
-               adj = NULL;
        } else if (circuit->circ_type == CIRCUIT_T_P2P) {
                del = false;
                for (level = IS_LEVEL_1; level <= IS_LEVEL_2; level++) {
@@ -326,8 +325,6 @@ void isis_adj_state_change(struct isis_adjacency *adj,
 
                if (del)
                        isis_delete_adj(adj);
-
-               adj = NULL;
        }
 
        return;
index 36a89168c28fc9ec8bba552dce8e2bdb96b3f0d5..00681b9db86167b85d17cd843f75c03812a48fbc 100644 (file)
@@ -269,7 +269,6 @@ static int fpt_halt(struct frr_pthread *fpt, void **res)
 {
        thread_add_event(fpt->master, &fpt_finish, fpt, 0, NULL);
        pthread_join(fpt->thread, res);
-       fpt = NULL;
 
        return 0;
 }
index 1f67c0d5ade8d114197e023ff83d43175f2ea5cf..486ef3335d473077284252b3a3ef75666723a5a7 100644 (file)
@@ -144,8 +144,6 @@ void ospf_packet_free(struct ospf_packet *op)
                stream_free(op->s);
 
        XFREE(MTYPE_OSPF_PACKET, op);
-
-       op = NULL;
 }
 
 struct ospf_fifo *ospf_fifo_new()