From 1c964ce59ba23b1ab515a8f0b6506329c1c3d3e1 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 31 Aug 2011 16:45:03 -0600 Subject: [PATCH] Only clear string pointer in parser for sub-value options Signed-off-by: Jens Axboe --- parse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } -- 2.25.1