null: drop unneeded casts from void* to non-void*
[fio.git] / init.c
diff --git a/init.c b/init.c
index 03cdf902261f51d6d4dc33360bdcb67bd9fe88c9..8a80138394cfdf81689f23f3f057c653874b3b86 100644 (file)
--- a/init.c
+++ b/init.c
@@ -938,6 +938,11 @@ static int fixup_options(struct thread_data *td)
                ret = 1;
        }
 
+       if (o->disable_lat)
+               o->lat_percentiles = 0;
+       if (o->disable_clat)
+               o->clat_percentiles = 0;
+
        /*
         * Fix these up to be nsec internally
         */
@@ -1083,8 +1088,11 @@ int ioengine_load(struct thread_data *td)
                 */
                dlhandle = td->io_ops_dlhandle;
                ops = load_ioengine(td);
-               if (ops == td->io_ops && dlhandle == td->io_ops_dlhandle)
+               if (ops == td->io_ops && dlhandle == td->io_ops_dlhandle) {
+                       if (dlhandle)
+                               dlclose(dlhandle);
                        return 0;
+               }
 
                if (dlhandle && dlhandle != td->io_ops_dlhandle)
                        dlclose(dlhandle);
@@ -1464,6 +1472,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        td->ts.lat_percentiles = o->lat_percentiles;
        td->ts.percentile_precision = o->percentile_precision;
        memcpy(td->ts.percentile_list, o->percentile_list, sizeof(o->percentile_list));
+       td->ts.sig_figs = o->sig_figs;
 
        for (i = 0; i < DDIR_RWDIR_CNT; i++) {
                td->ts.clat_stat[i].min_val = ULONG_MAX;