From: anlan_cs Date: Fri, 8 Apr 2022 01:04:51 +0000 (-0400) Subject: zebra: simplify one check for evpn-mh X-Git-Tag: frr-8.5.1~992^2~1 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=9a8fc8f88da14df447dbebc365058d7e664536cc;p=mirror_frr.git zebra: simplify one check for evpn-mh An simplification for one check in `zebra_evpn_mh_uplink_oper_flags_update()`. Signed-off-by: anlan_cs --- diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 02eda4a43..a4272dd82 100644 --- a/zebra/zebra_evpn_mh.c +++ b/zebra/zebra_evpn_mh.c @@ -3758,18 +3758,10 @@ static inline bool zebra_evpn_mh_is_all_uplinks_down(void) static void zebra_evpn_mh_uplink_oper_flags_update(struct zebra_if *zif, bool set) { - if (set) { - if (if_is_operative(zif->ifp)) { - if (!(zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP)) { - zif->flags |= ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP; - ++zmh_info->uplink_oper_up_cnt; - } - } else { - if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP) { - zif->flags &= ~ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP; - if (zmh_info->uplink_oper_up_cnt) - --zmh_info->uplink_oper_up_cnt; - } + if (set && if_is_operative(zif->ifp)) { + if (!(zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP)) { + zif->flags |= ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP; + ++zmh_info->uplink_oper_up_cnt; } } else { if (zif->flags & ZIF_FLAG_EVPN_MH_UPLINK_OPER_UP) {