Reduce oom cast from long to int

Oom values should never be greater then INT_MAX, they should be in the
range 0 - 1000.

Improves: d9a5dd4b91
This commit is contained in:
Christian Göttsche 2020-08-31 11:55:53 +02:00
parent 47a7d0bd74
commit e7f6d1ce5f
1 changed files with 1 additions and 1 deletions

View File

@ -492,7 +492,7 @@ long LinuxProcess_compare(const void* v1, const void* v2) {
return strcmp(p1->cgroup ? p1->cgroup : "", p2->cgroup ? p2->cgroup : "");
#endif
case OOM:
return ((long)p2->oom - (long)p1->oom);
return ((int)p2->oom - (int)p1->oom);
#ifdef HAVE_DELAYACCT
case PERCENT_CPU_DELAY:
return (p2->cpu_delay_percent > p1->cpu_delay_percent ? 1 : -1);