From: Stefan Weil Date: Sun, 9 Jun 2013 20:56:20 +0000 (+0200) Subject: xilinx_axienet: Fix bit mask code X-Git-Tag: v1.6.0-rc0~245 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4e298e46ddcbb3a2a653a582b54557b75180c625;p=thirdparty%2Fqemu.git 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 Signed-off-by: Edgar E. Iglesias --- diff --git a/hw/net/xilinx_axienet.c b/hw/net/xilinx_axienet.c index 8989e95297d..2ca1511c060 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) {