summaryrefslogtreecommitdiff
path: root/usr.bin/vmstat/vmstat.c
diff options
context:
space:
mode:
authorMartin Reindl <martin@cvs.openbsd.org>2006-02-11 16:47:00 +0000
committerMartin Reindl <martin@cvs.openbsd.org>2006-02-11 16:47:00 +0000
commitecab1133430b751d21807ffc653e547a82f76bdb (patch)
tree12a2d602906a158e1c2ff865d35723d3e8a7bd2b /usr.bin/vmstat/vmstat.c
parente0e6846b433f91ea1738a3d2d6ad199f4a451f40 (diff)
namelist must be NULL terminated, plus some cleanup after mickey
ok mickey@
Diffstat (limited to 'usr.bin/vmstat/vmstat.c')
-rw-r--r--usr.bin/vmstat/vmstat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index ffeec835279..8bf5a5c4048 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -1,5 +1,5 @@
/* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */
-/* $OpenBSD: vmstat.c,v 1.98 2006/01/31 18:24:56 mickey Exp $ */
+/* $OpenBSD: vmstat.c,v 1.99 2006/02/11 16:46:59 martin Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
@@ -40,7 +40,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)vmstat.c 8.1 (Berkeley) 6/6/93";
#else
-static const char rcsid[] = "$OpenBSD: vmstat.c,v 1.98 2006/01/31 18:24:56 mickey Exp $";
+static const char rcsid[] = "$OpenBSD: vmstat.c,v 1.99 2006/02/11 16:46:59 martin Exp $";
#endif
#endif /* not lint */
@@ -92,6 +92,7 @@ struct nlist namelist[] = {
{ "_nselcoll" },
#define X_POOLHEAD 7 /* sysctl */
{ "_pool_head" },
+ { "" },
};
struct nlist namelist2[] = {
@@ -1144,12 +1145,11 @@ kread(int nlx, void *addr, size_t size)
}
/*
- * kread reads something from the kernel, given its nlist index.
+ * kreado reads something from the kernel, given its nlist index.
*/
int
kreado(struct nlist *nl, void *addr, size_t size)
{
- char *sym;
int c;
if ((c = kvm_nlist(kd, nl)) != 0)