* [PATCH] bonding: simplify conditionals
@ 2010-10-05 18:41 Nicolas Kaiser
0 siblings, 0 replies; only message in thread
From: Nicolas Kaiser @ 2010-10-05 18:41 UTC (permalink / raw)
To: Jay Vosburgh; +Cc: bonding-devel, linux-kernel
Simplify conditionals:
(a || (!a && !b)) => (a || !b)
(!(!a && b)) => (a || !b)
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
drivers/net/bonding/bond_3ad.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
index 0ddf4c6..d0ad321 100644
--- a/drivers/net/bonding/bond_3ad.c
+++ b/drivers/net/bonding/bond_3ad.c
@@ -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;
}
--
1.7.2.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-10-05 18:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 18:41 [PATCH] bonding: simplify conditionals Nicolas Kaiser
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.