From d4e1d48f812d6ddb8e55cf5a87b4b104191f437c Mon Sep 17 00:00:00 2001 From: christos Date: Wed, 4 Jul 2007 18:27:46 +0000 Subject: [PATCH] Anon Ymous says that this should fix the lwp display core-dump. --- usr.bin/top/machine/m_netbsd15.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/usr.bin/top/machine/m_netbsd15.c b/usr.bin/top/machine/m_netbsd15.c index 377334c30626..66d5bad1ffac 100644 --- a/usr.bin/top/machine/m_netbsd15.c +++ b/usr.bin/top/machine/m_netbsd15.c @@ -1,4 +1,4 @@ -/* $NetBSD: m_netbsd15.c,v 1.29 2007/05/24 20:04:05 ad Exp $ */ +/* $NetBSD: m_netbsd15.c,v 1.30 2007/07/04 18:27:46 christos Exp $ */ /* * top - a top users display for Unix @@ -37,12 +37,12 @@ * Andrew Doran * * - * $Id: m_netbsd15.c,v 1.29 2007/05/24 20:04:05 ad Exp $ + * $Id: m_netbsd15.c,v 1.30 2007/07/04 18:27:46 christos Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: m_netbsd15.c,v 1.29 2007/05/24 20:04:05 ad Exp $"); +__RCSID("$NetBSD: m_netbsd15.c,v 1.30 2007/07/04 18:27:46 christos Exp $"); #endif #include @@ -645,6 +645,7 @@ get_lwp_info(struct system_info *si, struct process_select *sel, if (lbase == NULL) { if (sel->pid != -1) { nproc = 0; + nlwp = 0; } else { (void) fprintf(stderr, "top: Out of memory.\n"); quit(23);