From 7b4cb1320928bdea2360cf36fc45c83700052d43 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 18 Jun 2010 14:28:53 +0200 Subject: [PATCH] parser: match on length of argument, not potential value Otherwise we match subset of a string, that doesn't always work well. Signed-off-by: Jens Axboe --- parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse.c b/parse.c index ad2b1e3c..869bcdad 100644 --- 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 (!strncmp(vp->ival, ptr, strlen(vp->ival))) { + if (!strncmp(vp->ival, ptr, strlen(ptr))) { ret = 0; if (o->roff1) { if (vp->or) -- 2.25.1