Only do math on known keywords
authorJens Axboe <jens.axboe@oracle.com>
Fri, 13 Nov 2009 11:33:54 +0000 (12:33 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 13 Nov 2009 11:33:54 +0000 (12:33 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
options.c

index 211bca743048e5a16893634930a85b4eaa7f0e83..4544378eb16e6a0aa187eb7f303c1f63457f4ec7 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1880,13 +1880,15 @@ static char *fio_keyword_replace(char *opt)
                         */
                        opt = new;
                        free(o_org);
+
+                       /*
+                        * Check for potential math and invoke bc, if possible
+                        */
+                       opt = bc_calc(opt);
                }
        }
 
-       /*
-        * Check for potential math and invoke bc, if possible
-        */
-       return bc_calc(opt);
+       return opt;
 }
 
 int fio_options_parse(struct thread_data *td, char **opts, int num_opts)