diff options
author | Blue Swirl <blauwirbel@gmail.com> | 2010-08-26 18:04:18 +0000 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2010-08-26 18:04:18 +0000 |
commit | 9e84a4708f820976afd825745d4110dbaf58f431 (patch) | |
tree | 52d550312ebadaa1d4f9c50f73a984f201602616 /hw/etraxfs_eth.c | |
parent | 8aa80ff82fb62787cf49e7954e0e6eb4a0429af4 (diff) |
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: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/etraxfs_eth.c')
-rw-r--r-- | hw/etraxfs_eth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/etraxfs_eth.c b/hw/etraxfs_eth.c index b897c9c167..ade96f14ac 100644 --- a/hw/etraxfs_eth.c +++ b/hw/etraxfs_eth.c @@ -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. */ |