Merge branch 'xnvme_includes' of https://github.com/safl/fio
[fio.git] / log.c
diff --git a/log.c b/log.c
index 6c36813d4a9912b5e8742d2da55304f56b00f941..df58ea07a5a6c5c4254693dbd75b32927fe7adae 100644 (file)
--- a/log.c
+++ b/log.c
@@ -1,3 +1,5 @@
+#include "log.h"
+
 #include <unistd.h>
 #include <string.h>
 #include <stdarg.h>
@@ -42,6 +44,7 @@ size_t log_valist(const char *fmt, va_list args)
 }
 
 /* add prefix for the specified type in front of the valist */
+#ifdef FIO_INC_DEBUG
 void log_prevalist(int type, const char *fmt, va_list args)
 {
        char *buf1, *buf2;
@@ -61,9 +64,10 @@ void log_prevalist(int type, const char *fmt, va_list args)
        free(buf1);
        if (len < 0)
                return;
-       len = log_info_buf(buf2, len);
+       log_info_buf(buf2, len);
        free(buf2);
 }
+#endif
 
 ssize_t log_info(const char *format, ...)
 {