X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fxencpu.c;h=f1cd938810ac80b1640004ff98916e349a4b8229;hb=4d370741101aeb037ae52f3529a4a0869e0dc08a;hp=41c0d1b52b778155391ba3bb8c61d09a82955fd3;hpb=a5377cf935630082f2eac2e5f4a538844cc06c8d;p=collectd.git diff --git a/src/xencpu.c b/src/xencpu.c index 41c0d1b5..f1cd9388 100644 --- a/src/xencpu.c +++ b/src/xencpu.c @@ -54,7 +54,7 @@ static int xencpu_init (void) { ERROR ("xencpu: xc_interface_open() failed"); return (-1); - }; + } xc_physinfo_t *physinfo; @@ -72,7 +72,7 @@ static int xencpu_init (void) xc_interface_close(xc_handle); free(physinfo); return (-1); - }; + } num_cpus = physinfo->nr_cpus; free(physinfo); @@ -142,8 +142,8 @@ static int xencpu_read (void) return (-1); } - int cpu, status; - for (cpu = 0; cpu < nr_cpus; cpu++) { + int status; + for (int cpu = 0; cpu < nr_cpus; cpu++) { gauge_t rate = NAN; value_t value = {.derive = cpu_info[cpu].idletime};