parse: make it clear that 'cp' can't be NULL for o->off1
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index 83c59f7026ca7e06b5371d59adfb2b0bd2d39b35..188f72826185d2a1c3dba8f48bca01ccfa2a1e56 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -624,7 +624,7 @@ static int __handle_option(struct fio_option *o, const char *ptr, void *data,
                        ret = 1;
                        for (i = 0; i < PARSE_MAX_VP; i++) {
                                vp = &posval[i];
-                               if (!vp->ival || vp->ival[0] == '\0')
+                               if (!vp->ival || vp->ival[0] == '\0' || !cp)
                                        continue;
                                all_skipped = 0;
                                if (!strncmp(vp->ival, ptr, str_match_len(vp, ptr))) {