summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bootchart/store.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootchart/store.c b/src/bootchart/store.c
index 3099ff1208..9ea1b27de4 100644
--- a/src/bootchart/store.c
+++ b/src/bootchart/store.c
@@ -199,7 +199,7 @@ vmstat_next:
if (strstr(key, "cpu")) {
r = safe_atoi((const char*)(key+3), &c);
- if (r < 0 || c > MAXCPUS)
+ if (r < 0 || c > MAXCPUS -1)
/* Oops, we only have room for MAXCPUS data */
break;
sampledata->runtime[c] = atoll(rt);