The purpose of `gauges` is not very easy to spot. I'd declare this as `gauge_t percent` inside this function, then the purpose if obvious:

```c
percent = 100.0 * ((gauge_t) derives[i]) / ((gauge_t) cpu_total);
if (report_by_cpu)
  submit_value (cpu_num, i, 0, percent);
else /* if (percent != -1) doesn't really make sense, does it? */
  percents[i] += percent;
```