Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/vmstat Use __arraycount(), as done above.
details: https://anonhg.NetBSD.org/src/rev/cf0bcebb184c
branches: trunk
changeset: 769739:cf0bcebb184c
user: jym <jym%NetBSD.org@localhost>
date: Wed Sep 21 12:08:02 2011 +0000
description:
Use __arraycount(), as done above.
diffstat:
usr.bin/vmstat/vmstat.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 7af880a21ad1 -r cf0bcebb184c usr.bin/vmstat/vmstat.c
--- a/usr.bin/vmstat/vmstat.c Wed Sep 21 10:18:52 2011 +0000
+++ b/usr.bin/vmstat/vmstat.c Wed Sep 21 12:08:02 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.183 2011/09/06 18:44:46 joerg Exp $ */
+/* $NetBSD: vmstat.c,v 1.184 2011/09/21 12:08:02 jym Exp $ */
/*-
* Copyright (c) 1998, 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 3/1/95";
#else
-__RCSID("$NetBSD: vmstat.c,v 1.183 2011/09/06 18:44:46 joerg Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.184 2011/09/21 12:08:02 jym Exp $");
#endif
#endif /* not lint */
@@ -1486,8 +1486,7 @@
cpuhit = 0;
cpumiss = 0;
- for (i = 0; i < sizeof(pc->pc_cpus) / sizeof(pc->pc_cpus[0]);
- i++) {
+ for (i = 0; i < __arraycount(pc->pc_cpus); i++) {
if ((addr = pc->pc_cpus[i]) == NULL)
continue;
deref_kptr(addr, cc, sizeof(*cc),
Home |
Main Index |
Thread Index |
Old Index