summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-11-06 09:21:10 -0700
committerJens Axboe <axboe@fb.com>2014-11-06 09:21:10 -0700
commit8a1db9a16e1075498e5d6166fa46b419cecd8af8 (patch)
treefdf212c4be45849b2647945c566c9afb7b765212 /parse.c
parentd6b72507e72d3f2ed334fa5665880b0ab59dbfdd (diff)
downloadfio-8a1db9a16e1075498e5d6166fa46b419cecd8af8.tar.gz
fio-8a1db9a16e1075498e5d6166fa46b419cecd8af8.tar.bz2
Make fio -Wshadow clean
Found a few issues, actually. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 9e31908a..282baa4c 100644
--- a/parse.c
+++ b/parse.c
@@ -1081,11 +1081,13 @@ static int string_distance(const char *s1, const char *s2)
q[0] = p[0] + 1;
for (j = 1; j <= s2_len; j++) {
unsigned int sub = p[j - 1];
+ unsigned int pmin;
if (s1[i - 1] != s2[j - 1])
sub++;
- q[j] = min(p[j] + 1, min(q[j - 1] + 1, sub));
+ pmin = min(q[j - 1] + 1, sub);
+ q[j] = min(p[j] + 1, pmin);
}
r = p;
p = q;