Use unsigned types for CPU counts and associated variables

This commit is contained in:
Christian Göttsche
2021-02-17 17:38:35 +01:00
committed by Benny Baumann
parent 53bcc5cbff
commit a11d01568c
32 changed files with 88 additions and 89 deletions

View File

@ -236,7 +236,7 @@ int Platform_getMaxPid() {
return maxPid;
}
double Platform_setCPUValues(Meter* this, int cpu) {
double Platform_setCPUValues(Meter* this, unsigned int cpu) {
const LinuxProcessList* pl = (const LinuxProcessList*) this->pl;
const CPUData* cpuData = &(pl->cpus[cpu]);
double total = (double) ( cpuData->totalPeriod == 0 ? 1 : cpuData->totalPeriod);