Module Name: src
Committed By: skrll
Date: Sat Mar 8 18:08:16 UTC 2014
Modified Files:
src/sys/arch/evbarm/tsarm/isa: isa_machdep.c
Log Message:
Fix a bug found by gcc 4.8
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/tsarm/isa/isa_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbarm/tsarm/isa/isa_machdep.c
diff -u src/sys/arch/evbarm/tsarm/isa/isa_machdep.c:1.12 src/sys/arch/evbarm/tsarm/isa/isa_machdep.c:1.13
--- src/sys/arch/evbarm/tsarm/isa/isa_machdep.c:1.12 Sat Oct 27 17:17:49 2012
+++ src/sys/arch/evbarm/tsarm/isa/isa_machdep.c Sat Mar 8 18:08:16 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: isa_machdep.c,v 1.12 2012/10/27 17:17:49 chs Exp $ */
+/* $NetBSD: isa_machdep.c,v 1.13 2014/03/08 18:08:16 skrll Exp $ */
/*-
* Copyright (c) 1996-1998 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.12 2012/10/27 17:17:49 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isa_machdep.c,v 1.13 2014/03/08 18:08:16 skrll Exp $");
#include "opt_irqstats.h"
@@ -116,7 +116,7 @@ isa_intr_alloc(isa_chipset_tag_t ic, int
/* some interrupts should never be dynamically allocated */
mask &= 0x00e0;
- for (i = 0; i < sizeof(isairq); i++) {
+ for (i = 0; i < __arraycount(isairq); i++) {
if ((mask & (1<<isairq[i])) == 0)
continue;
if (isairq_nhandlers[i] < count || count == -1) {
@@ -147,7 +147,7 @@ isa_intr_establish(isa_chipset_tag_t ic,
{
int epirq = -1, i;
/* Find real EP93XX irq number */
- for(i = 0; i < sizeof(isairq); i++) {
+ for(i = 0; i < __arraycount(isairq); i++) {
if (irq == isairq[i]) epirq = ep93xxirq[i];
}