sysinfo: fix single-core OpenBSD results.

Summary:
Basically missed this one. CPU_STATES is 6 as it's still supposedly a work-in-progress. But we only need 5 for all
queries (for now).

Reviewers: stephenmhouston, zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5070
This commit is contained in:
Al Poole 2017-08-04 17:22:32 -04:00 committed by Mike Blumenkrantz
parent 1a622a68ed
commit 6bd2d74cdc
1 changed files with 1 additions and 1 deletions

View File

@ -89,7 +89,7 @@ _cpumonitor_sysctl_getusage(unsigned long *prev_total, unsigned long *prev_idle,
return;
unsigned long total = 0;
for (j = 0; j < CPU_STATES; j++)
for (j = 0; j < CPU_STATES - 1; j++)
total += cpu_times[j];
unsigned long idle = cpu_times[4];