Linux: fix CPU count

This commit is contained in:
Hisham Muhammad 2018-08-24 18:34:12 -03:00
parent 8d01ae2054
commit bae27054e6
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
if (file == NULL) {
CRT_fatalError("Cannot open " PROCSTATFILE);
}
int cpus = -1;
int cpus = 0;
do {
char buffer[PROC_LINE_LENGTH + 1];
if (fgets(buffer, PROC_LINE_LENGTH + 1, file) == NULL) {