summaryrefslogtreecommitdiff
path: root/epan/crypt
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-07-26 09:27:07 -0400
committerAnders Broman <a.broman58@gmail.com>2016-07-26 18:06:33 +0000
commit9a73978ba5bbb78026721500aaf332f53e19d0cd (patch)
treed78c8267c6ccaa3d8f4aa2a72b982be3a92c8cc9 /epan/crypt
parent407c0d01b6555839b1fbd205f8d748279622b859 (diff)
downloadwireshark-9a73978ba5bbb78026721500aaf332f53e19d0cd.tar.gz
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')
-rw-r--r--epan/crypt/CMakeLists.txt1
-rw-r--r--epan/crypt/Makefile.am1
-rw-r--r--epan/crypt/airpdcap_debug.c55
-rw-r--r--epan/crypt/airpdcap_debug.h8
4 files changed, 6 insertions, 59 deletions
diff --git a/epan/crypt/CMakeLists.txt b/epan/crypt/CMakeLists.txt
index b32d7f6bcc..b0030911fd 100644
--- a/epan/crypt/CMakeLists.txt
+++ b/epan/crypt/CMakeLists.txt
@@ -29,7 +29,6 @@ include_directories(
set(CRYPT_FILES
airpdcap.c
airpdcap_ccmp.c
- airpdcap_debug.c
airpdcap_rijndael.c
airpdcap_tkip.c
${CUSTOM_CRYPT_SRC}
diff --git a/epan/crypt/Makefile.am b/epan/crypt/Makefile.am
index b7f2a36556..b1d0fda3e9 100644
--- a/epan/crypt/Makefile.am
+++ b/epan/crypt/Makefile.am
@@ -30,7 +30,6 @@ include Custom.common
libairpdcap_la_SOURCES = \
airpdcap.c \
airpdcap_ccmp.c \
- airpdcap_debug.c \
airpdcap_rijndael.c \
airpdcap_tkip.c \
airpdcap_debug.h \
diff --git a/epan/crypt/airpdcap_debug.c b/epan/crypt/airpdcap_debug.c
deleted file mode 100644
index ee37fb02c3..0000000000
--- a/epan/crypt/airpdcap_debug.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/* airpdcap_debug.c
- *
- * Copyright (c) 2006 CACE Technologies, Davis (California)
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the project nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/******************************************************************************/
-/* File includes */
-/* */
-#include "airpdcap_debug.h"
-/* */
-/******************************************************************************/
-
-#ifdef _DEBUG
-
-#ifdef __cplusplus
-extern "C" {
-#endif
- 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 __cplusplus
-}
-#endif
-
-#endif
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);