mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
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->existingCPUs = 1;
|
||||
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;
|
||||
return;
|
||||
}
|
||||
@ -209,6 +209,7 @@ static void LinuxProcessList_updateCPUcount(ProcessList* super) {
|
||||
for (unsigned int j = currExisting; j < max; j++) {
|
||||
this->cpuData[j].online = false;
|
||||
}
|
||||
this->cpuData[0].online = true; /* average is always "online" */
|
||||
currExisting = max;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user