Drop the only local variable declaration within a for-loop (C99)
authorTomohiro Kusumi <tkusumi@tuxera.com>
Fri, 14 Apr 2017 21:06:19 +0000 (00:06 +0300)
committerJens Axboe <axboe@fb.com>
Wed, 26 Apr 2017 18:43:10 +0000 (12:43 -0600)
Nothing happens at least with gcc by default, but this is the only
C99 (or after) specific declaration, so change it to normal style.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
parse.c

diff --git a/parse.c b/parse.c
index fd5605f0c33f2bdb56dea64012b658d7d7c82b40..4d4fdddeae573f12e10270291785401029399d53 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -135,6 +135,7 @@ static unsigned long long get_mult_time(const char *str, int len,
        const char *p = str;
        char *c;
        unsigned long long mult = 1;
+       int i;
 
        /*
          * Go forward until we hit a non-digit, or +/- sign
@@ -153,7 +154,7 @@ static unsigned long long get_mult_time(const char *str, int len,
        }
 
        c = strdup(p);
-       for (int i = 0; i < strlen(c); i++)
+       for (i = 0; i < strlen(c); i++)
                c[i] = tolower(c[i]);
 
        if (!strncmp("us", c, 2) || !strncmp("usec", c, 4))