From e942d1f6a2605221412983a685f580db798ae1bb Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Sat, 27 Apr 2024 20:59:05 +0800 Subject: [PATCH] bgpd: fix the dead code Fixed the Coverity issue 1586018: Control flow issues (DEADCODE) /bgpd/bgp_ecommunity.c: 1402 in ecommunity_ecom2str() Signed-off-by: anlan_cs --- bgpd/bgp_ecommunity.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bgpd/bgp_ecommunity.c b/bgpd/bgp_ecommunity.c index be8f56637e..d392b6585c 100644 --- a/bgpd/bgp_ecommunity.c +++ b/bgpd/bgp_ecommunity.c @@ -1396,11 +1396,7 @@ char *ecommunity_ecom2str(struct ecommunity *ecom, int format, int filter) if (sub_type == ECOMMUNITY_LINK_BANDWIDTH) ecommunity_lb_str(encbuf, sizeof(encbuf), pnt, ecom->disable_ieee_floating); - else - unk_ecom = 1; - } else if (type == ECOMMUNITY_ENCODE_AS_NON_TRANS) { - sub_type = *pnt++; - if (sub_type == ECOMMUNITY_EXTENDED_LINK_BANDWIDTH) + else if (sub_type == ECOMMUNITY_EXTENDED_LINK_BANDWIDTH) ipv6_ecommunity_lb_str(encbuf, sizeof(encbuf), pnt); else -- 2.39.5