summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_te.c
diff options
context:
space:
mode:
authorpaco <paco@voltanet.io>2018-06-26 20:33:47 +0200
committerpaco <paco@voltanet.io>2018-06-26 20:33:47 +0200
commit9df48e81eef2e8ab07915ef9f504503f31f37750 (patch)
tree4e72945635e259707d8c3181a0a3fdb10164c53d /ospfd/ospf_te.c
parentMerge pull request #2549 from pacovn/Coverity_1452317_Explicit_null_dereferenced (diff)
downloadfrr-9df48e81eef2e8ab07915ef9f504503f31f37750.tar.xz
frr-9df48e81eef2e8ab07915ef9f504503f31f37750.zip
ospfd: dead code (Coverity 1302500)
Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to 'ospfd/ospf_te.c')
-rw-r--r--ospfd/ospf_te.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index 2b1b32861..86125d0c7 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -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);