projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fix off-by-one in cpu mask index handling
[fio.git]
/
options.c
diff --git
a/options.c
b/options.c
index 017920e14031357e9ae2aae6dca977b64ced62fc..b5195c35c7e4bae7991d66b8c83b89c1f644bf58 100644
(file)
--- a/
options.c
+++ b/
options.c
@@
-443,9
+443,9
@@
static int str_cpumask_cb(void *data, unsigned long long *val)
for (i = 0; i < sizeof(int) * 8; i++) {
if ((1 << i) & *val) {
- if (i > max_cpu) {
+ if (i >
=
max_cpu) {
log_err("fio: CPU %d too large (max=%ld)\n", i,
- max_cpu);
+ max_cpu
- 1
);
return 1;
}
dprint(FD_PARSE, "set cpu allowed %d\n", i);