ki_pctcpu is unsigned, so we cast to long before subtracting.

This commit is contained in:
Dag-Erling Smørgrav 2004-07-05 14:52:06 +00:00
parent 4946a00b0b
commit f92a11552e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=131627

View File

@ -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)