Code

Add optional configuration to write_log; allow writing JSON.
[collectd.git] / src / xencpu.c
index 59fbcb982d70bbd7b9668b44adffeef8abe564fd..f1cd938810ac80b1640004ff98916e349a4b8229 100644 (file)
@@ -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};