From 58c09e854f68be79471e82f94dcdf4b8c9e6fb3e Mon Sep 17 00:00:00 2001 From: capt-d Date: Sun, 25 Dec 2016 20:31:04 +0100 Subject: [PATCH] Added support for multicore processors --- plugins/cpu/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cpu/cpu.c b/plugins/cpu/cpu.c index ae049ba..e680d40 100644 --- a/plugins/cpu/cpu.c +++ b/plugins/cpu/cpu.c @@ -62,7 +62,7 @@ cpu_get_load_real(struct cpu_stat *cpu, unsigned int core) if (!stat) return -1; sprintf(buf, "%s%u %s", "cpu", core-1, "%lu %lu %lu %lu %lu"); - fscanf(stat, buf, &cpu->u, &cpu->n, &cpu->s,&cpu->i, &cpu->w); + if (fscanf(stat, buf, &cpu->u, &cpu->n, &cpu->s,&cpu->i, &cpu->w)); pclose(stat); } return 0;