core: Insure "il" is initialized in all cases
authorErwan Velu <erwan@enovance.com>
Mon, 22 Jul 2013 21:48:48 +0000 (23:48 +0200)
committerErwan Velu <erwan@enovance.com>
Mon, 22 Jul 2013 21:48:48 +0000 (23:48 +0200)
Prior this commit, "il" was not initialized and check_int() was supposed
to setup it's value before usage.

In fact, check_int() can let "il" uninitialized leading to a dprint()
with a unintialized value.

parse.c

diff --git a/parse.c b/parse.c
index f54dae625bbbb59387f035cdb08f9fe1768675e1..d3eb2c4af7d08d8dcdc7c63cbe85fd7300883bbe 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -380,7 +380,7 @@ static int str_match_len(const struct value_pair *vp, const char *str)
 static int __handle_option(struct fio_option *o, const char *ptr, void *data,
                           int first, int more, int curr)
 {
-       int il, *ilp;
+       int il=0, *ilp;
        fio_fp64_t *flp;
        long long ull, *ullp;
        long ul1, ul2;