diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-01-09 14:15:39 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-01-09 22:17:16 +0000 |
commit | a81f0d1b38e86c6b4c464b49a4168924e9216df9 (patch) | |
tree | 2b5bc2dfa1382df2556ee0062e07afdc2f5a4659 /epan/crypt/airpdcap_debug.h | |
parent | 2bb26eaf2ce383de7162c094f41ea6486b13462e (diff) |
Fix airpdcap debugging code.
Change-Id: Ied1094dd3c6ad176fea830c0857ba43e09d3cb10
Reviewed-on: https://code.wireshark.org/review/6457
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'epan/crypt/airpdcap_debug.h')
-rw-r--r-- | epan/crypt/airpdcap_debug.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/crypt/airpdcap_debug.h b/epan/crypt/airpdcap_debug.h index 82b686c94a..40d82b5424 100644 --- a/epan/crypt/airpdcap_debug.h +++ b/epan/crypt/airpdcap_debug.h @@ -60,6 +60,8 @@ void print_debug_line(const CHAR *function, const CHAR *msg, const INT level); #include <stdio.h> #include <time.h> +#include <epan/to_str.h> + /* Debug level definition */ #define AIRPDCAP_DEBUG_LEVEL_1 1 #define AIRPDCAP_DEBUG_LEVEL_2 2 @@ -87,12 +89,12 @@ void print_debug_line(const CHAR *function, const CHAR *msg, const INT level); #endif #endif -#define DEBUG_DUMP(x,y,z) \ - { \ - char* tmp_str = (char*)bytes_to_str(NULL, y, (z)); \ - g_warning("%s: %s", x, ) \ - wmem_free(NULL, tmp_str); \ - } +static inline void DEBUG_DUMP(x,y,z) +{ + char* tmp_str = bytes_to_str(NULL, (const guint8 *) y, (z)); + g_warning("%s: %s", x, tmp_str); + wmem_free(NULL, tmp_str); +} #else /* !defined _DEBUG */ |