Fix out-of-bound index and clean up code.

There was an out-of-bound index after something like 7.5 hours of
active use.  This probably caused the metrics daemon to restart
and pollute some of the memuse statistics, the very ones
responsible for the overflow.

TEST=ran manually and verified memuse is still reported

Change-Id: I70709f8cbba63ea1ca5e277b2ab58729e072e127
Reviewed-by: Luigi Semenzato <>
Commit-Queue: Luigi Semenzato <>
Tested-by: Luigi Semenzato <>
2 files changed
tree: 8a1506af3a282b8e38057485f60024b03205d7e7
  1. metrics/