Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev Fix off by one.
details: https://anonhg.NetBSD.org/src/rev/8dd9f2be0e1b
branches: trunk
changeset: 783188:8dd9f2be0e1b
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Mon Dec 10 06:07:34 2012 +0000
description:
Fix off by one.
diffstat:
sys/dev/lockstat.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 8927d3fab504 -r 8dd9f2be0e1b sys/dev/lockstat.c
--- a/sys/dev/lockstat.c Mon Dec 10 05:03:42 2012 +0000
+++ b/sys/dev/lockstat.c Mon Dec 10 06:07:34 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lockstat.c,v 1.15 2008/04/28 20:23:46 martin Exp $ */
+/* $NetBSD: lockstat.c,v 1.16 2012/12/10 06:07:34 msaitoh Exp $ */
/*-
* Copyright (c) 2006, 2007 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.15 2008/04/28 20:23:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lockstat.c,v 1.16 2012/12/10 06:07:34 msaitoh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -270,7 +270,7 @@
cpuno = 0;
for (CPU_INFO_FOREACH(cii, ci)) {
- if (cpuno > sizeof(ld->ld_freq) / sizeof(ld->ld_freq[0])) {
+ if (cpuno >= sizeof(ld->ld_freq) / sizeof(ld->ld_freq[0])) {
log(LOG_WARNING, "lockstat: too many CPUs\n");
break;
}
Home |
Main Index |
Thread Index |
Old Index