lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20101005204149.6a43d080@absol.kitzblitz>
Date:	Tue, 5 Oct 2010 20:41:49 +0200
From:	Nicolas Kaiser <nikai@...ai.net>
To:	Jay Vosburgh <fubar@...ibm.com>
Cc:	bonding-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: [PATCH] bonding: simplify conditionals

Simplify conditionals:
 (a || (!a && !b)) => (a || !b)
 (!(!a && b)) => (a || !b)

Signed-off-by: Nicolas Kaiser <nikai@...ai.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ