bonding: simplify conditionals
Subsystems (2)
PATCH 1/1 bonding: simplify conditionals
Simplify conditionals:
(a || (!a && !b)) => (a || !b)
(!(!a && b)) => (a || !b)
Signed-off-by Nicolas Kaiser <[email protected]>
--- drivers/net/bonding/bond_3ad.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
drivers/net/bonding/bond_3ad.c +3 -4
@@ -1541,10 +1541,9 @@ static void ad_agg_selection_logic(struct aggregator *agg)*/ if (active && active->lag_ports && active->lag_ports->is_enabled && - (__agg_has_partner (active) || - (!__agg_has_partner (active) && !__agg_has_partner (best)))) { -if (!(!active->actor_oper_aggregator_key && - best->actor_oper_aggregator_key)) { + (__agg_has_partner (active) || !__agg_has_partner (best))) { +if (active->actor_oper_aggregator_key || + !best->actor_oper_aggregator_key) { best =NULL ; active->is_active =1 ; }
Signature · 1 line
1.7.2.2