return (int)(postfix - str);
}
+static int str_match_len(const struct value_pair *vp, const char *str)
+{
+ return max(strlen(vp->ival), opt_len(str));
+}
+
#define val_store(ptr, val, off, or, data) \
do { \
ptr = td_var((data), (off)); \
if (!vp->ival || vp->ival[0] == '\0')
continue;
all_skipped = 0;
- if (!strncmp(vp->ival, ptr, opt_len(ptr))) {
+ if (!strncmp(vp->ival, ptr, str_match_len(vp, ptr))) {
ret = 0;
if (o->roff1) {
if (vp->or)
if (!vp->ival || vp->ival[0] == '\0')
continue;
all_skipped = 0;
- if (!strncmp(vp->ival, ptr, opt_len(ptr))) {
+ if (!strncmp(vp->ival, ptr, str_match_len(vp, ptr))) {
char *rest;
ret = 0;
o->maxval = UINT_MAX;
}
if (o->type == FIO_OPT_FLOAT_LIST) {
+#ifndef NAN
+#define NAN __builtin_nanf("")
+#endif
o->minfp = NAN;
o->maxfp = NAN;
}