X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcpu.c;h=e7f3c187dd236f00ed00251a679c216f7bdc5f75;hb=c4439c9cb3e2348ad7013644731de27a55eca478;hp=5a32b6b2a50966f7cf647207f3d18e06b704a515;hpb=7b0628b4f4688d48d89f94ca381ca6340da05b37;p=collectd.git diff --git a/src/cpu.c b/src/cpu.c index 5a32b6b2..e7f3c187 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -29,8 +29,8 @@ #include "collectd.h" -#include "common.h" #include "plugin.h" +#include "utils/common/common.h" #ifdef HAVE_MACH_KERN_RETURN_H #include @@ -187,12 +187,12 @@ struct cpu_state_s { }; typedef struct cpu_state_s cpu_state_t; -static cpu_state_t *cpu_states = NULL; -static size_t cpu_states_num = 0; /* #cpu_states allocated */ +static cpu_state_t *cpu_states; +static size_t cpu_states_num; /* #cpu_states allocated */ /* Highest CPU number in the current iteration. Used by the dispatch logic to * determine how many CPUs there were. Reset to 0 by cpu_reset(). */ -static size_t global_cpu_num = 0; +static size_t global_cpu_num; static bool report_by_cpu = true; static bool report_by_state = true;