mirror of https://github.com/xzeldon/htop.git
The average CPU utilization value must never be marked 'offline'
Fixes https://github.com/htop-dev/htop/issues/729
This commit is contained in:
parent
6d3b4a0f2e
commit
02cfd38671
|
@ -171,7 +171,7 @@ static void LinuxProcessList_updateCPUcount(ProcessList* super) {
|
||||||
super->activeCPUs = 1;
|
super->activeCPUs = 1;
|
||||||
super->existingCPUs = 1;
|
super->existingCPUs = 1;
|
||||||
this->cpuData = xReallocArray(this->cpuData, 2, sizeof(CPUData));
|
this->cpuData = xReallocArray(this->cpuData, 2, sizeof(CPUData));
|
||||||
this->cpuData[0].online = true;
|
this->cpuData[0].online = true; /* average is always "online" */
|
||||||
this->cpuData[1].online = true;
|
this->cpuData[1].online = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -209,6 +209,7 @@ static void LinuxProcessList_updateCPUcount(ProcessList* super) {
|
||||||
for (unsigned int j = currExisting; j < max; j++) {
|
for (unsigned int j = currExisting; j < max; j++) {
|
||||||
this->cpuData[j].online = false;
|
this->cpuData[j].online = false;
|
||||||
}
|
}
|
||||||
|
this->cpuData[0].online = true; /* average is always "online" */
|
||||||
currExisting = max;
|
currExisting = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue