Fixup two compile warnings
[fio.git] / init.c
diff --git a/init.c b/init.c
index bc17b40213a5bacdcecae2ca89e937ef86d6c8b8..6b6e386e398a04b4d8e27c7a034e6cd66e58025c 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1426,12 +1426,6 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        }
 
        if (o->hist_log_file) {
-#ifndef CONFIG_ZLIB
-               if (td->client_type) {
-                       log_err("fio: --write_hist_log requires zlib in client/server mode\n");
-                       goto err;
-               }
-#endif
                struct log_params p = {
                        .td = td,
                        .avg_msec = o->log_avg_msec,
@@ -1444,6 +1438,13 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
                };
                const char *suf;
 
+#ifndef CONFIG_ZLIB
+               if (td->client_type) {
+                       log_err("fio: --write_hist_log requires zlib in client/server mode\n");
+                       goto err;
+               }
+#endif
+
                if (p.log_gz_store)
                        suf = "log.fz";
                else