diff options
author | Michael Mann <mmann78@netscape.net> | 2016-07-26 09:27:07 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-07-26 18:06:33 +0000 |
commit | 9a73978ba5bbb78026721500aaf332f53e19d0cd (patch) | |
tree | d78c8267c6ccaa3d8f4aa2a72b982be3a92c8cc9 /epan/crypt/airpdcap_debug.h | |
parent | 407c0d01b6555839b1fbd205f8d748279622b859 (diff) |
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 <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/crypt/airpdcap_debug.h')
-rw-r--r-- | epan/crypt/airpdcap_debug.h | 8 |
1 files changed, 6 insertions, 2 deletions
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); |