diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2020-08-31 11:55:53 +0200 |
---|---|---|
committer | Christian Göttsche <cgzones@googlemail.com> | 2020-08-31 11:55:53 +0200 |
commit | e7f6d1ce5fa5b10c856f4e4b2e0c062d3b6f7b74 (patch) | |
tree | 7c0b61b08f6590e0711e259a92aedc1f9a93e0b1 | |
parent | 47a7d0bd74277371d20446d2fd5cc7410008e484 (diff) |
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: d9a5dd4b916636b5e7ba8631885427372f0cfcad
-rw-r--r-- | linux/LinuxProcess.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index 6bae9886..5970c938 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -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); |