diff options
author | Bruce Evans <bde@FreeBSD.org> | 1999-03-05 16:38:13 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1999-03-05 16:38:13 +0000 |
commit | efc96764e08d591aca3d0802b15d5676315daafb (patch) | |
tree | ae1915d174d88b6360d2cec1d1537c374cce37b4 /usr.bin/top | |
parent | 4eb316f78291ed9618ad5b4be4d19a3c3798349f (diff) | |
download | src-efc96764e08d591aca3d0802b15d5676315daafb.tar.gz src-efc96764e08d591aca3d0802b15d5676315daafb.zip |
The magic "no-cpu" cpu number is 0xff. Don't misrepresent cpu
numbers as chars or use bogus casts in an attempt to unmisrepresnt
them. In top, don't assume that 0xff is the only negative cpu
number when cpu numbers are (mis)represented.
Notes
Notes:
svn path=/head/; revision=44487
Diffstat (limited to 'usr.bin/top')
-rw-r--r-- | usr.bin/top/machine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index 6aabe8adf41f..d64d494e128c 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -19,7 +19,7 @@ * Steven Wallace <swallace@freebsd.org> * Wolfram Schneider <wosch@FreeBSD.org> * - * $Id: machine.c,v 1.20 1999/02/06 06:33:55 dillon Exp $ + * $Id: machine.c,v 1.21 1999/02/06 16:58:50 fenner Exp $ */ @@ -584,7 +584,7 @@ char *(*get_userid)(); /* generate "STATE" field */ switch (state = PP(pp, p_stat)) { case SRUN: - if (smpmode && PP(pp, p_oncpu) >= 0) + if (smpmode && PP(pp, p_oncpu) == 0xff) sprintf(status, "CPU%d", PP(pp, p_oncpu)); else strcpy(status, "RUN"); |