diff options
| author | anlan_cs <vic.lan@pica8.com> | 2022-04-07 21:04:51 -0400 | 
|---|---|---|
| committer | anlan_cs <vic.lan@pica8.com> | 2022-04-12 01:26:54 -0400 | 
| commit | 9a8fc8f88da14df447dbebc365058d7e664536cc (patch) | |
| tree | 58d0f55fc17a9c7b0391ab906f9bba38c109544a /zebra/zebra_evpn_mh.c | |
| parent | 403715424069cbf831bd532c615d36d83e5c6c1c (diff) | |
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 <vic.lan@pica8.com>
Diffstat (limited to 'zebra/zebra_evpn_mh.c')
| -rw-r--r-- | zebra/zebra_evpn_mh.c | 16 | 
1 files changed, 4 insertions, 12 deletions
diff --git a/zebra/zebra_evpn_mh.c b/zebra/zebra_evpn_mh.c index 02eda4a438..a4272dd82e 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) {  | 
