aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2017-05-08 20:39:15 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2017-06-04 18:42:55 +0300
commit1f6fb58d053a2c23e562b00d4b0d2d3a75ced461 (patch)
tree6c7f98d7f512ae9e2b6cabeb9265248b24bf0a27 /hw
parentbb0b6f39c032c18e3a72c5ebef4e4968a9dcb4d0 (diff)
downloadqemu-1f6fb58d053a2c23e562b00d4b0d2d3a75ced461.zip
qemu-1f6fb58d053a2c23e562b00d4b0d2d3a75ced461.tar.gz
qemu-1f6fb58d053a2c23e562b00d4b0d2d3a75ced461.tar.bz2
hw/sparc: use ARRAY_SIZE() macro
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'hw')
-rw-r--r--hw/sparc64/sun4u.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index 18b8f8b..69f565d 100644
--- a/hw/sparc64/sun4u.c
+++ b/hw/sparc64/sun4u.c
@@ -214,7 +214,7 @@ static void isa_irq_handler(void *opaque, int n, int level)
qemu_irq *irqs = opaque;
int ivec;
- assert(n < 16);
+ assert(n < ARRAY_SIZE(isa_irq_to_ivec));
ivec = isa_irq_to_ivec[n];
EBUS_DPRINTF("Set ISA IRQ %d level %d -> ivec 0x%x\n", n, level, ivec);
if (ivec) {