From 9a73978ba5bbb78026721500aaf332f53e19d0cd Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Tue, 26 Jul 2016 09:27:07 -0400 Subject: Move airpdcap's print_debug_line() to airpdcap_debug.h It saves a little on file pollution and the g_warning call isn't bothered in the header file. Change-Id: Ia9bdd96d9d93bbba6811769c4e6e1ed9124c2e5a Reviewed-on: https://code.wireshark.org/review/16698 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- epan/crypt/airpdcap_debug.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'epan/crypt/airpdcap_debug.h') diff --git a/epan/crypt/airpdcap_debug.h b/epan/crypt/airpdcap_debug.h index 7e52befcd2..149384e8ed 100644 --- a/epan/crypt/airpdcap_debug.h +++ b/epan/crypt/airpdcap_debug.h @@ -37,8 +37,6 @@ #include "airpdcap_interop.h" -void print_debug_line(const CHAR *function, const CHAR *msg, const INT level); - #ifdef _DEBUG #ifdef __FUNCTION__ #define AIRPDCAP_DEBUG_PRINT_LINE(notdefined, msg, level) print_debug_line(__FUNCTION__, msg, level); @@ -71,6 +69,12 @@ void print_debug_line(const CHAR *function, const CHAR *msg, const INT level); #define AIRPDCAP_DEBUG_USED_LEVEL AIRPDCAP_DEBUG_LEVEL_3 +static inline void print_debug_line(const CHAR *function, const CHAR *msg, const INT level) +{ + if (level<=AIRPDCAP_DEBUG_USED_LEVEL) + g_warning("dbg(%d)|(%s) %s", level, function, msg); +} + #ifdef _TRACE #ifdef __FUNCTION__ #define AIRPDCAP_DEBUG_TRACE_START(notdefined) print_debug_line(__FUNCTION__, "Start!", AIRPDCAP_DEBUG_USED_LEVEL); -- cgit v1.2.3