diff options
author | Nathan Scott <nathans@redhat.com> | 2021-08-17 14:41:55 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2021-08-17 14:41:55 +1000 |
commit | c7f634ec218da6bdb3bab9e9cd6fa7b2df3fcea8 (patch) | |
tree | 5522eeea3bdbec5e6bbbe614845a8463452740b8 /pcp/PCPProcessList.c | |
parent | c401ac3a98563f84e1957445f4c5643186e0e9d3 (diff) |
PCP: ensure unsigned types used throughout CPU count detection
This cannot be negative in these code locations, but for the
purposes of static checking like Coverity scan make it clear
and used the same unsigned type as ProcessList.h for the CPU
count variable (matching PL activeCPUs and existingCPUs).
Diffstat (limited to 'pcp/PCPProcessList.c')
-rw-r--r-- | pcp/PCPProcessList.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pcp/PCPProcessList.c b/pcp/PCPProcessList.c index e4f9a5fd..3001d5e8 100644 --- a/pcp/PCPProcessList.c +++ b/pcp/PCPProcessList.c @@ -35,7 +35,7 @@ static void PCPProcessList_updateCPUcount(PCPProcessList* this) { unsigned int cpus = Platform_getMaxCPU(); if (cpus == pl->existingCPUs) return; - if (cpus <= 0) + if (cpus == 0) cpus = pl->activeCPUs; if (cpus <= 1) cpus = pl->activeCPUs = 1; |