From e1c2dc56fd2e4c9bd58d1ede0fd0a8698f091e67 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 24 Aug 2018 18:34:12 -0300 Subject: [PATCH] Linux: fix CPU count --- linux/LinuxProcessList.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index f599699e..399d349f 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -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) {