[PATCH] parse cleanups
authorJens Axboe <jens.axboe@oracle.com>
Fri, 27 Oct 2006 09:33:01 +0000 (11:33 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 27 Oct 2006 09:33:01 +0000 (11:33 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
parse.c

diff --git a/parse.c b/parse.c
index 204b9d25bf20c5f10ac566d417802ecf090cb757..197a46e1aee24a84760a5991ae2024ed4d329f44 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -109,7 +109,7 @@ static int check_range_bytes(char *str, unsigned long *val)
        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;
@@ -117,27 +117,17 @@ int check_int(char *p, unsigned int *val)
        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;
 }