return 1;
}
-int check_int(char *p, unsigned int *val)
+static int check_int(char *p, unsigned int *val)
{
if (sscanf(p, "%u", val) == 1)
return 0;
return 1;
}
-int check_strset(char *p, char *name)
-{
- return strncmp(p, name, strlen(name));
-}
-
static struct fio_option *find_option(struct fio_option *options,
const char *opt)
{
- struct fio_option *o;
- int i = 0;
-
- do {
- o = &options[i];
- if (!o->name)
- break;
+ struct fio_option *o = &options[0];
+ while (o->name) {
if (!strcmp(o->name, opt))
return o;
- i++;
- } while (1);
+ o++;
+ }
return NULL;
}