summaryrefslogtreecommitdiffstats
path: root/hw/net
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-06-09 22:56:20 +0200
committerEdgar E. Iglesias <edgar.iglesias@gmail.com>2013-06-10 13:00:41 +0200
commit4e298e46ddcbb3a2a653a582b54557b75180c625 (patch)
tree22ecc9697f9ebce8d7c1f72492b29cd45f24f6aa /hw/net
parent7387de16d0e4d2988df350926537cd12a8e34206 (diff)
downloadhqemu-4e298e46ddcbb3a2a653a582b54557b75180c625.zip
hqemu-4e298e46ddcbb3a2a653a582b54557b75180c625.tar.gz
xilinx_axienet: Fix bit mask code
Obviously the code wanted to mask the lower bits but failed to do so because of a missing "<". cppcheck detected a conditional expression which was always true (1 < 7). Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/xilinx_axienet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c
index 8989e95..2ca1511 100644
--- a/hw/net/xilinx_axienet.c
+++ b/hw/net/xilinx_axienet.c
@@ -575,7 +575,7 @@ static void enet_write(void *opaque, hwaddr addr,
break;
case R_MC:
- value &= ((1 < 7) - 1);
+ value &= ((1 << 7) - 1);
/* Enable the MII. */
if (value & MC_EN) {
OpenPOWER on IntegriCloud