projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7387de1
)
xilinx_axienet: Fix bit mask code
author
Stefan Weil
<sw@weilnetz.de>
Sun, 9 Jun 2013 20:56:20 +0000
(22:56 +0200)
committer
Edgar E. Iglesias
<edgar.iglesias@gmail.com>
Mon, 10 Jun 2013 11:00:41 +0000
(13:00 +0200)
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>
hw/net/xilinx_axienet.c
patch
|
blob
|
history
diff --git
a/hw/net/xilinx_axienet.c
b/hw/net/xilinx_axienet.c
index 8989e95297df5ad32d61f8a030a58d0fe8d555f2..2ca1511c06045f8f738b9a466764f572534d9418 100644
(file)
--- 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) {