Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/mcbus avoid array overrun, noticed by gcc 4.5.
details: https://anonhg.NetBSD.org/src/rev/29d5a7c9a878
branches: trunk
changeset: 769883:29d5a7c9a878
user: chs <chs%NetBSD.org@localhost>
date: Sun Sep 25 13:37:20 2011 +0000
description:
avoid array overrun, noticed by gcc 4.5.
diffstat:
sys/arch/alpha/mcbus/mcbus.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r f7d29776b5fa -r 29d5a7c9a878 sys/arch/alpha/mcbus/mcbus.c
--- a/sys/arch/alpha/mcbus/mcbus.c Sun Sep 25 13:36:53 2011 +0000
+++ b/sys/arch/alpha/mcbus/mcbus.c Sun Sep 25 13:37:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcbus.c,v 1.20 2008/07/09 21:25:59 joerg Exp $ */
+/* $NetBSD: mcbus.c,v 1.21 2011/09/25 13:37:20 chs Exp $ */
/*
* Copyright (c) 1998 by Matthew Jacob
@@ -37,7 +37,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.20 2008/07/09 21:25:59 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcbus.c,v 1.21 2011/09/25 13:37:20 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -129,7 +129,7 @@
bcs[mcbus_primary.mcbus_bcache] : "Unknown");
mbp->mcbus_types[0] = MCBUS_TYPE_RES;
- for (mid = 1; mid <= MCBUS_MID_MAX; ++mid)
+ for (mid = 1; mid < MCBUS_MID_MAX; ++mid)
mbp->mcbus_types[mid] = MCBUS_TYPE_UNK;
/*
Home |
Main Index |
Thread Index |
Old Index