Thread (6 messages) flat view 6 messages, 2 authors, 2004-10-23
STALE7992d

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

From: John W. Linville <hidden>
Date: 2004-10-23 01:58:46
Also in: lkml

Simplify tricky if() expression in rtl8169_vlan_rx_register().

Signed-off-by: John W. Linville <redacted>
---
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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help