summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorTomohiro Kusumi <tkusumi@tuxera.com>2017-04-15 00:06:19 +0300
committerJens Axboe <axboe@fb.com>2017-04-26 12:43:10 -0600
commit1c9f076109b15af6e03f92d9b80034d034d5b6cd (patch)
tree1f427befa93ca9c9cb720eb0b2de7e83b37d02fb /parse.c
parent9e55f2c7debac6683b1c41ce1f816ed868396798 (diff)
downloadfio-1c9f076109b15af6e03f92d9b80034d034d5b6cd.tar.gz
fio-1c9f076109b15af6e03f92d9b80034d034d5b6cd.tar.bz2
Drop the only local variable declaration within a for-loop (C99)
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>
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index fd5605f0..4d4fddde 100644
--- 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))