X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbootchart%2Fstore.c;h=9ea1b27de4b1666614170b91d55a8f212bb4ca11;hb=31938a8560a664c32a9d72f1fc2d4347b232e6e9;hp=3099ff12083a8271df27ad24c4b646c037c404fd;hpb=9bcf7507fab6e6b022ae3cc7178237e6e0a09e9a;p=elogind.git diff --git a/src/bootchart/store.c b/src/bootchart/store.c index 3099ff120..9ea1b27de 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);