parse: don't check for < 0 on an unsigned type
authorJens Axboe <axboe@kernel.dk>
Fri, 15 Dec 2017 16:13:28 +0000 (09:13 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 Dec 2017 16:13:28 +0000 (09:13 -0700)
We do strict errors on some builds, this breaks them. Remove the
<= 0 check, just check for a value that's too large.

Fixes: c26438ad ("parse: dump option type when using --debug=parse")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
parse.c

diff --git a/parse.c b/parse.c
index a9486de..a9ee1ce 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -491,7 +491,7 @@ static const char *opt_type_name(struct fio_option *o)
        compiletime_assert(ARRAY_SIZE(opt_type_names) - 1 == FIO_OPT_UNSUPPORTED,
                                "opt_type_names[] index");
 
-       if (o->type >= 0 && o->type <= FIO_OPT_UNSUPPORTED)
+       if (o->type <= FIO_OPT_UNSUPPORTED)
                return opt_type_names[o->type];
 
        return "OPT_UNKNOWN?";