projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add safe checks for valid pareto input value
[fio.git]
/
t
/
genzipf.c
diff --git
a/t/genzipf.c
b/t/genzipf.c
index d06f5619b15d38f3c991bb0e20b4e28d35b1effe..c3ab4ae1b1d8608214269dad4dda966d32540130 100644
(file)
--- a/
t/genzipf.c
+++ b/
t/genzipf.c
@@
-137,6
+137,10
@@
int main(int argc, char *argv[])
}
val = atof(argv[2]);
+ if ((val >= 1.00 || val < 0.00) && !use_zipf) {
+ printf("pareto input must be > 0.00 and < 1.00\n");
+ return 1;
+ }
nranges = DEF_NR;
output_nranges = DEF_NR_OUTPUT;