qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH 08/11] hw/sparc: use ARRAY_SIZE() macro


From: Philippe Mathieu-Daudé
Subject: [Qemu-trivial] [PATCH 08/11] hw/sparc: use ARRAY_SIZE() macro
Date: Mon, 8 May 2017 20:39:15 -0300

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 hw/sparc64/sun4u.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
index d347b6616d..525d6f44a0 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) {
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]