summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell2014-03-17 17:00:39 +0100
committerMichael Tokarev2014-03-27 16:22:49 +0100
commit7d45e784015971e70239e33256fd606638107a3e (patch)
tree197a26290dc9ae2758213230d6b2c81c15792da7 /hw
parenttests/libqos/pci-pc: Avoid shifting left into sign bit (diff)
downloadqemu-7d45e784015971e70239e33256fd606638107a3e.tar.gz
qemu-7d45e784015971e70239e33256fd606638107a3e.tar.xz
qemu-7d45e784015971e70239e33256fd606638107a3e.zip
hw/intc/slavio_intctl: Avoid shifting left into sign bit
Add 'U' suffix to avoid undefined behaviour. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/intc/slavio_intctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c
index 41a1672800..b10fb66b8d 100644
--- a/hw/intc/slavio_intctl.c
+++ b/hw/intc/slavio_intctl.c
@@ -272,7 +272,7 @@ static void slavio_check_interrupts(SLAVIO_INTCTLState *s, int set_irqs)
CPU_IRQ_TIMER_IN;
if (i == s->target_cpu) {
for (j = 0; j < 32; j++) {
- if ((s->intregm_pending & (1 << j)) && intbit_to_level[j]) {
+ if ((s->intregm_pending & (1U << j)) && intbit_to_level[j]) {
s->slaves[i].intreg_pending |= 1 << intbit_to_level[j];
}
}