Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/vmstat The last NULL entry should not be printed on ...



details:   https://anonhg.NetBSD.org/src/rev/7556b69d12e8
branches:  trunk
changeset: 542571:7556b69d12e8
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Feb 01 20:52:58 2003 +0000

description:
The last NULL entry should not be printed on missing symbols.

diffstat:

 usr.bin/vmstat/vmstat.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 84d313e5e4b8 -r 7556b69d12e8 usr.bin/vmstat/vmstat.c
--- a/usr.bin/vmstat/vmstat.c   Sat Feb 01 19:12:30 2003 +0000
+++ b/usr.bin/vmstat/vmstat.c   Sat Feb 01 20:52:58 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmstat.c,v 1.109 2003/02/01 06:29:14 thorpej Exp $ */
+/* $NetBSD: vmstat.c,v 1.110 2003/02/01 20:52:58 matt Exp $ */
 
 /*-
  * Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)vmstat.c   8.2 (Berkeley) 3/1/95";
 #else
-__RCSID("$NetBSD: vmstat.c,v 1.109 2003/02/01 06:29:14 thorpej Exp $");
+__RCSID("$NetBSD: vmstat.c,v 1.110 2003/02/01 20:52:58 matt Exp $");
 #endif
 #endif /* not lint */
 
@@ -382,7 +382,7 @@
                if (c == -1)
                        errx(1, "kvm_nlist: %s %s", "namelist", kvm_geterr(kd));
                (void)fprintf(stderr, "vmstat: undefined symbols:");
-               for (c = 0; c < sizeof(namelist) / sizeof(namelist[0]); c++)
+               for (c = 0; c < sizeof(namelist) / sizeof(namelist[0])-1; c++)
                        if (namelist[c].n_type == 0)
                                fprintf(stderr, " %s", namelist[c].n_name);
                (void)fputc('\n', stderr);



Home | Main Index | Thread Index | Old Index