gettime: Rework the clock thread starting mechanism
[fio.git] / parse.c
diff --git a/parse.c b/parse.c
index a9486de9b7fbea40af8bf98237dcff15d1d0d69d..fdb66115c310d2f60652e37fcd0d410eeaa23dd5 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -172,7 +172,7 @@ static unsigned long long get_mult_time(const char *str, int len,
 
        c = strdup(p);
        for (i = 0; i < strlen(c); i++)
-               c[i] = tolower(c[i]);
+               c[i] = tolower((unsigned char)c[i]);
 
        if (!strncmp("us", c, 2) || !strncmp("usec", c, 4))
                mult = 1;
@@ -218,7 +218,7 @@ static unsigned long long __get_mult_bytes(const char *p, void *data,
        c = strdup(p);
 
        for (i = 0; i < strlen(c); i++) {
-               c[i] = tolower(c[i]);
+               c[i] = tolower((unsigned char)c[i]);
                if (is_separator(c[i])) {
                        c[i] = '\0';
                        break;
@@ -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?";