Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/tsarm/isa Fix a bug found by gcc 4.8
details: https://anonhg.NetBSD.org/src/rev/c51b38e9b0d5
branches: trunk
changeset: 327465:c51b38e9b0d5
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Mar 08 18:08:16 2014 +0000
description:
Fix a bug found by gcc 4.8
diffstat:
sys/arch/evbarm/tsarm/isa/isa_machdep.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 9650f07badd0 -r c51b38e9b0d5 sys/arch/evbarm/tsarm/isa/isa_machdep.c
--- a/sys/arch/evbarm/tsarm/isa/isa_machdep.c Sat Mar 08 18:07:39 2014 +0000
+++ b/sys/arch/evbarm/tsarm/isa/isa_machdep.c Sat Mar 08 18:08:16 2014 +0000
@@ -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 @@
/* 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 @@
{
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];
}
Home |
Main Index |
Thread Index |
Old Index