diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-03-17 16:00:39 +0000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2014-03-27 19:22:49 +0400 |
commit | 7d45e784015971e70239e33256fd606638107a3e (patch) | |
tree | 197a26290dc9ae2758213230d6b2c81c15792da7 /hw/intc | |
parent | a879125b47c3ae554c01824f996a64a45a86556e (diff) |
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/intc')
-rw-r--r-- | hw/intc/slavio_intctl.c | 2 |
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]; } } |