summaryrefslogtreecommitdiff
path: root/usr.bin/top/machine.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/top/machine.c')
-rw-r--r--usr.bin/top/machine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c
index 1f2cef12024..020f6a2d7c7 100644
--- a/usr.bin/top/machine.c
+++ b/usr.bin/top/machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machine.c,v 1.41 2004/06/11 05:29:28 deraadt Exp $ */
+/* $OpenBSD: machine.c,v 1.42 2004/06/11 16:08:54 deraadt Exp $ */
/*-
* Copyright (c) 1994 Thorsten Lockert <tholo@sigmasoft.com>
@@ -377,7 +377,7 @@ state_abbr(struct kinfo_proc2 *pp)
{
static char buf[10];
- if (ncpu > 1)
+ if (ncpu > 1 && pp->p_cpuid != KI_NOCPU)
snprintf(buf, sizeof buf, "%s/%d",
state_abbrev[(unsigned char)pp->p_stat], pp->p_cpuid);
else