ki_pctcpu is unsigned, so we cast to long before subtracting.
This commit is contained in:
parent
4946a00b0b
commit
f92a11552e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131627
@ -774,7 +774,7 @@ static int sorted_state[] =
|
||||
|
||||
|
||||
#define ORDERKEY_PCTCPU(a, b) do { \
|
||||
long diff = (b)->ki_pctcpu - (a)->ki_pctcpu; \
|
||||
long diff = (long)(b)->ki_pctcpu - (long)(a)->ki_pctcpu; \
|
||||
if (diff != 0) \
|
||||
return (diff > 0 ? 1 : -1); \
|
||||
} while (0)
|
||||
|
Loading…
Reference in New Issue
Block a user