projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d45e78
)
hw/intc/xilinx_intc: Avoid shifting left into sign bit
author
Peter Maydell
<peter.maydell@linaro.org>
Mon, 17 Mar 2014 16:00:40 +0000
(16:00 +0000)
committer
Michael Tokarev
<mjt@tls.msk.ru>
Thu, 27 Mar 2014 15:22:49 +0000
(19:22 +0400)
Avoid undefined behaviour shifting left into the sign bit.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/intc/xilinx_intc.c
patch
|
blob
|
history
diff --git
a/hw/intc/xilinx_intc.c
b/hw/intc/xilinx_intc.c
index 4a103988f33dc374a32476f101721aaada5465a5..1b228ff4e0fa72cba3b122e4c3e5429b0294f574 100644
(file)
--- a/
hw/intc/xilinx_intc.c
+++ b/
hw/intc/xilinx_intc.c
@@
-71,8
+71,9
@@
static void update_irq(struct xlx_pic *p)
/* Update the vector register. */
for (i = 0; i < 32; i++) {
- if (p->regs[R_IPR] & (1
<< i))
+ if (p->regs[R_IPR] & (1
U << i)) {
break;
+ }
}
if (i == 32)
i = ~0;