I'd remove this line and reset `percents` to the invalid value after the "flush" (replace the *memset()* there). This version has the downside that if cpu 0 has a cpu state "foo" and cpu 1 doesn't, then the previous data will be lost. Resetting this immediately after the flush is much more straight forward, too.