From: Jens Axboe Date: Fri, 19 Mar 2010 18:09:37 +0000 (+0100) Subject: __dprint() fixup X-Git-Tag: fio-1.38~4 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=2d5c40e77a4ee9103de9a43f016d77858366e1a2;hp=d048ba60fc1e207ac3204ef3306a32fac77293fa __dprint() fixup Only define __dprint() function when FIO_INC_DEBUG is set. And don't check debug type once, not both in dprint() and __dprint(). Signed-off-by: Jens Axboe --- diff --git a/debug.c b/debug.c index 9722878a..013cd53c 100644 --- a/debug.c +++ b/debug.c @@ -3,6 +3,7 @@ #include #include "debug.h" +#ifdef FIO_INC_DEBUG void __dprint(int type, const char *str, ...) { va_list args; @@ -10,18 +11,16 @@ void __dprint(int type, const char *str, ...) assert(type < FD_DEBUG_MAX); - if ((((1 << type)) & fio_debug) == 0) - return; - pid = getpid(); if (fio_debug_jobp && *fio_debug_jobp != -1U && pid != *fio_debug_jobp) return; - log_info("%-8s ", debug_levels[(type)].name); + log_info("%-8s ", debug_levels[type].name); log_info("%-5u ", (int) pid); va_start(args, str); log_valist(str, args); va_end(args); } +#endif