diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2017-05-08 20:39:15 -0300 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2017-06-04 18:42:55 +0300 |
commit | 1f6fb58d053a2c23e562b00d4b0d2d3a75ced461 (patch) | |
tree | 6c7f98d7f512ae9e2b6cabeb9265248b24bf0a27 /hw/sparc64 | |
parent | bb0b6f39c032c18e3a72c5ebef4e4968a9dcb4d0 (diff) |
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/sparc64')
-rw-r--r-- | hw/sparc64/sun4u.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 18b8f8bcba..69f565db25 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) { |