summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-08-24 18:34:12 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-08-24 18:39:00 -0300
commite1c2dc56fd2e4c9bd58d1ede0fd0a8698f091e67 (patch)
tree881fc06a328f2ff69acbd3cb8504ab16a2ab1465
parente9f95da5599a3ea96663e391ad21bb002fede01d (diff)
Linux: fix CPU count
-rw-r--r--linux/LinuxProcessList.c2
1 files changed, 1 insertions, 1 deletions
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) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy