提交 9e84a470 编写于 作者: B Blue Swirl

etraxfs_eth: correct use of ! and &

Combining bitwise AND and logical NOT is suspicious.

Fixed by this Coccinelle script:
// From http://article.gmane.org/gmane.linux.kernel/646367
@@ expression E1,E2; @@
(
 !E1 & !E2
|
- !E1 & E2
+ !(E1 & E2)
)
Acked-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 8aa80ff8
......@@ -464,7 +464,7 @@ static int eth_match_groupaddr(struct fs_eth *eth, const unsigned char *sa)
/* First bit on the wire of a MAC address signals multicast or
physical address. */
if (!m_individual && !sa[0] & 1)
if (!m_individual && !(sa[0] & 1))
return 0;
/* Calculate the hash index for the GA registers. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册