SCCS-vsn: usr.bin/w/proc_compare.c 5.4
-static char sccsid[] = "@(#)proc_compare.c 5.3 (Berkeley) %G%";
+static char sccsid[] = "@(#)proc_compare.c 5.4 (Berkeley) %G%";
#define isrun(p) (((p)->p_stat == SRUN) || ((p)->p_stat == SIDL))
#define TESTAB(a, b) ((a)<<1 | (b))
#define isrun(p) (((p)->p_stat == SRUN) || ((p)->p_stat == SIDL))
#define TESTAB(a, b) ((a)<<1 | (b))
-#define ONLYA 0x10
-#define ONLYB 0x01
-#define BOTH 0x11
+#define ONLYA 2
+#define ONLYB 1
+#define BOTH 3
proc_compare(p1, p2)
register struct proc *p1, *p2;
proc_compare(p1, p2)
register struct proc *p1, *p2;
*/
switch (TESTAB(isrun(p1), isrun(p2))) {
case ONLYA:
*/
switch (TESTAB(isrun(p1), isrun(p2))) {
case ONLYA:
- return (1);
- case ONLYB:
+ case ONLYB:
+ return (1);
case BOTH:
/*
* tie - favor one with highest recent cpu utilization
case BOTH:
/*
* tie - favor one with highest recent cpu utilization