X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcpu.c;h=79dc15070e5f551f6fd57395c666c11b9745a5f0;hb=911b17c0df15eb9448ba41e773fa645f6aaa603e;hp=2e225fd1cfea5a869ea7cb23e84e88a0d0496172;hpb=d76d25155399943bc9d317c6fb6d1981ca6e9b00;p=collectd.git diff --git a/src/cpu.c b/src/cpu.c index 2e225fd1..79dc1507 100644 --- a/src/cpu.c +++ b/src/cpu.c @@ -241,10 +241,11 @@ static int cpu_states_grow (void) return -1; } - for (i = percents_cells; i < size; i++) + percents = tmp; + + for (i = percents_cells ; i < size; i++) memset(&percents[i], 0, sizeof(*percents)); - percents = tmp; percents_cells = size; return 0; } /* cpu_states_grow */