[patch netdev-2.6 3/3] r8169: simplify trick if() expression

From: John W. Linville
Date: Fri Oct 22 2004 - 21:07:07 EST


Simplify tricky if() expression in rtl8169_vlan_rx_register().

Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx>
---
You're probably right -- the "if ((tp->vlgrp = grp))" line is probably
a little TOO clever... :-)

drivers/net/r8169.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)

--- ./drivers/net/r8169.c.orig 2004-10-22 21:44:06.050154952 -0400
+++ ./drivers/net/r8169.c 2004-10-22 21:44:26.228087440 -0400
@@ -703,7 +703,8 @@ static void rtl8169_vlan_rx_register(str
unsigned long flags;

spin_lock_irqsave(&tp->lock, flags);
- if ((tp->vlgrp = grp))
+ tp->vlgrp = grp;
+ if (tp->vlgrp)
tp->cp_cmd |= RxVlan;
else
tp->cp_cmd &= ~RxVlan;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/