]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ospfd: dead code (Coverity 1302500)
authorpaco <paco@voltanet.io>
Tue, 26 Jun 2018 18:33:47 +0000 (20:33 +0200)
committerpaco <paco@voltanet.io>
Tue, 26 Jun 2018 18:33:47 +0000 (20:33 +0200)
Signed-off-by: F. Aragon <paco@voltanet.io>
ospfd/ospf_te.c

index 2b1b328617e31e1c1ef034095b0da3eb5e68eae6..86125d0c769fcb11ea3e55da2295ddbc59999fc8 100644 (file)
@@ -2051,12 +2051,11 @@ static uint16_t ospf_mpls_te_show_link_subtlv(struct vty *vty,
                                              struct tlv_header *tlvh0,
                                              uint16_t subtotal, uint16_t total)
 {
-       struct tlv_header *tlvh, *next;
+       struct tlv_header *tlvh;
        uint16_t sum = subtotal;
 
        for (tlvh = tlvh0; sum < total;
-            tlvh = (next ? next : TLV_HDR_NEXT(tlvh))) {
-               next = NULL;
+            tlvh = TLV_HDR_NEXT(tlvh)) {
                switch (ntohs(tlvh->type)) {
                case TE_LINK_SUBTLV_LINK_TYPE:
                        sum += show_vty_link_subtlv_link_type(vty, tlvh);