From: Jens Axboe Date: Wed, 31 Aug 2011 22:45:03 +0000 (-0600) Subject: Only clear string pointer in parser for sub-value options X-Git-Tag: fio-1.58~11 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1c964ce59ba23b1ab515a8f0b6506329c1c3d3e1;p=fio.git Only clear string pointer in parser for sub-value options Signed-off-by: Jens Axboe --- diff --git a/parse.c b/parse.c index 25de29e2..2dee446d 100644 --- a/parse.c +++ b/parse.c @@ -489,8 +489,10 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data, posval_sort(o, posval); - if (!o->posval[0].ival) + if (!o->posval[0].ival) { + vp = NULL; goto match; + } ret = 1; for (i = 0; i < PARSE_MAX_VP; i++) { @@ -514,7 +516,7 @@ match: if (rest) { *rest = '\0'; ptr = rest + 1; - } else + } else if (vp && vp->cb) ptr = NULL; break; }