From 471fd3d71d17210ca0dc583272f757e48bdb9cef Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 5 Jul 2013 11:24:18 +0200 Subject: src: Fix #ifdef around swrap_log(). --- src/socket_wrapper.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 46d8b0c..dbf20ac 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -71,10 +71,6 @@ enum swrap_dbglvl_e { SWRAP_LOG_TRACE }; -#ifdef NDEBUG -#define SWRAP_LOG(dbglvl, ...) -#else - /* GCC have printf type attribute check. */ #ifdef __GNUC__ #define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b))) @@ -213,9 +209,12 @@ static SWRAP_THREAD struct socket_info *sockets; void swrap_destructor(void) DESTRUCTOR_ATTRIBUTE; +#ifdef NDEBUG +# define SWRAP_LOG(...) +#else + static void swrap_log(enum swrap_dbglvl_e dbglvl, const char *format, ...) PRINTF_ATTRIBUTE(2, 3); -#define SWRAP_LOG(dbglvl, ...) swrap_log((dbglvl), __VA_ARGS__) -#endif +# define SWRAP_LOG(dbglvl, ...) swrap_log((dbglvl), __VA_ARGS__) static void swrap_log(enum swrap_dbglvl_e dbglvl, const char *format, ...) { @@ -258,6 +257,7 @@ static void swrap_log(enum swrap_dbglvl_e dbglvl, const char *format, ...) } } } +#endif /********************************************************* * SWRAP LOADING LIBC FUNCTIONS -- cgit