mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Fix initialization of cpuData structure. Closes #159.
This commit is contained in:
parent
430c7c9a9b
commit
36b7832884
@ -63,7 +63,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList) {
|
||||
fclose(file);
|
||||
|
||||
this->cpuCount = MAX(cpus - 1, 1);
|
||||
this->cpus = realloc(this->cpus, cpus * sizeof(CPUData));
|
||||
this->cpus = calloc(cpus, sizeof(CPUData));
|
||||
|
||||
for (int i = 0; i < cpus; i++) {
|
||||
this->cpus[i].totalTime = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user