projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
936216f
)
parser: match on length of argument, not potential value
author
Jens Axboe
<jaxboe@fusionio.com>
Fri, 18 Jun 2010 12:28:53 +0000
(14:28 +0200)
committer
Jens Axboe
<jaxboe@fusionio.com>
Fri, 18 Jun 2010 12:28:53 +0000
(14:28 +0200)
Otherwise we match subset of a string, that doesn't always
work well.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
parse.c
patch
|
blob
|
blame
|
history
diff --git
a/parse.c
b/parse.c
index ad2b1e3c76cf9a3691a7466598de6823b8064b20..869bcdad4cf2bf43ae6dc2bf8b46a0c1362e0339 100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-299,7
+299,7
@@
static int __handle_option(struct fio_option *o, const char *ptr, void *data,
if (!vp->ival || vp->ival[0] == '\0')
continue;
all_skipped = 0;
if (!vp->ival || vp->ival[0] == '\0')
continue;
all_skipped = 0;
- if (!strncmp(vp->ival, ptr, strlen(
vp->ival
))) {
+ if (!strncmp(vp->ival, ptr, strlen(
ptr
))) {
ret = 0;
if (o->roff1) {
if (vp->or)
ret = 0;
if (o->roff1) {
if (vp->or)