diff options
author | jkim <jkim@FreeBSD.org> | 2014-10-29 19:21:19 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2014-10-29 19:21:19 +0000 |
commit | dde27ca539609de3097606aea6701c6c2ad8e6ca (patch) | |
tree | f39b9367b5cd8faf09143a772cac74e738e6f8c8 /usr.bin/top | |
parent | efa19ba5b4fbce344fd0e1445732b186edeaf0dc (diff) | |
download | FreeBSD-src-dde27ca539609de3097606aea6701c6c2ad8e6ca.zip FreeBSD-src-dde27ca539609de3097606aea6701c6c2ad8e6ca.tar.gz |
Replace a magic number with the proper definition. This change actually
fixes broken state field after r273266, i.e., "CPU-1" was displayed in place
of "RUN".
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 de57b94..0a74521 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -941,7 +941,7 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags) /* generate "STATE" field */ switch (state = pp->ki_stat) { case SRUN: - if (smpmode && pp->ki_oncpu != 0xff) + if (smpmode && pp->ki_oncpu != NOCPU) sprintf(status, "CPU%d", pp->ki_oncpu); else strcpy(status, "RUN"); @@ -1100,7 +1100,7 @@ format_next_process(caddr_t handle, char *(*get_userid)(int), int flags) /* format this entry */ if (smpmode) { - if (state == SRUN && pp->ki_oncpu != 0xff) + if (state == SRUN && pp->ki_oncpu != NOCPU) cpu = pp->ki_oncpu; else cpu = pp->ki_lastcpu; |