From 2879599ac4e7f73d047e058abb91d69fc4999776 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 11 Apr 2019 01:16:25 +0200 Subject: [PATCH] #ifndef on all header files --- client/cliparser/cliparser.h | 3 +++ client/emv/test/cda_test.h | 3 +++ client/emv/test/crypto_test.h | 3 +++ client/emv/test/cryptotest.h | 3 +++ client/emv/test/dda_test.h | 3 +++ client/emv/test/sda_test.h | 3 +++ client/jansson/lookup3.h | 4 ++++ client/pm3_bit_limits.h | 3 +++ client/proxgui.h | 4 ++++ client/reveng/getopt.h | 5 +++++ client/tinycbor/tinycbor-version.h | 3 +++ 11 files changed, 37 insertions(+) diff --git a/client/cliparser/cliparser.h b/client/cliparser/cliparser.h index 44d9cc12c..66a800f61 100644 --- a/client/cliparser/cliparser.h +++ b/client/cliparser/cliparser.h @@ -8,6 +8,8 @@ // Command line parser core commands //----------------------------------------------------------------------------- +#ifndef __CLIPARSER_H +#define __CLIPARSER_H #include "argtable3.h" #include "util.h" #include @@ -39,3 +41,4 @@ void CLIParserFree(void); int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen); int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen); +#endif diff --git a/client/emv/test/cda_test.h b/client/emv/test/cda_test.h index e535c2eee..1c326e908 100644 --- a/client/emv/test/cda_test.h +++ b/client/emv/test/cda_test.h @@ -13,6 +13,9 @@ * Lesser General Public License for more details. */ +#ifndef __CDA_TEST_H +#define __CDA_TEST_H #include int exec_cda_test(bool verbose); +#endif diff --git a/client/emv/test/crypto_test.h b/client/emv/test/crypto_test.h index afc8a1515..024a950d5 100644 --- a/client/emv/test/crypto_test.h +++ b/client/emv/test/crypto_test.h @@ -13,6 +13,9 @@ * Lesser General Public License for more details. */ +#ifndef __CRYPTO_TEST_H +#define __CRYPTO_TEST_H #include int exec_crypto_test(bool verbose); +#endif diff --git a/client/emv/test/cryptotest.h b/client/emv/test/cryptotest.h index 671de244e..74a317e4e 100644 --- a/client/emv/test/cryptotest.h +++ b/client/emv/test/cryptotest.h @@ -8,6 +8,9 @@ // Crypto algorithms testing //----------------------------------------------------------------------------- +#ifndef __CRYPTOTEST_H +#define __CRYPTOTEST_H #include int ExecuteCryptoTests(bool verbose); +#endif diff --git a/client/emv/test/dda_test.h b/client/emv/test/dda_test.h index 34381938a..a5c1999a1 100644 --- a/client/emv/test/dda_test.h +++ b/client/emv/test/dda_test.h @@ -13,6 +13,9 @@ * Lesser General Public License for more details. */ +#ifndef __DDA_TEST_H +#define __DDA_TEST_H #include int exec_dda_test(bool verbose); +#endif diff --git a/client/emv/test/sda_test.h b/client/emv/test/sda_test.h index 696a17f9b..a7b45fbf0 100644 --- a/client/emv/test/sda_test.h +++ b/client/emv/test/sda_test.h @@ -13,4 +13,7 @@ * Lesser General Public License for more details. */ +#ifndef __SDA_TEST_H +#define __SDA_TEST_H int exec_sda_test(bool verbose); +#endif diff --git a/client/jansson/lookup3.h b/client/jansson/lookup3.h index 45f477480..265e3f7db 100644 --- a/client/jansson/lookup3.h +++ b/client/jansson/lookup3.h @@ -34,6 +34,9 @@ on 1 byte), but shoehorning those bytes into integers efficiently is messy. ------------------------------------------------------------------------------- */ +#ifndef LOOKUP3_H +#define LOOKUP3_H + #include #ifdef HAVE_CONFIG_H @@ -454,3 +457,4 @@ static uint32_t hashlittle(const void *key, size_t length, uint32_t initval) { final(a, b, c); return c; } +#endif diff --git a/client/pm3_bit_limits.h b/client/pm3_bit_limits.h index 943b2fd7e..9bf06e16e 100644 --- a/client/pm3_bit_limits.h +++ b/client/pm3_bit_limits.h @@ -1,4 +1,7 @@ +#ifndef __BITLIB_LIMITS_H +#define __BITLIB_LIMITS_H #define BITLIB_FLOAT_BITS 53 #define BITLIB_FLOAT_MAX 0xfffffffffffffL #define BITLIB_FLOAT_MIN (-0x10000000000000L) #define BITLIB_FLOAT_UMAX 0x1fffffffffffffUL +#endif diff --git a/client/proxgui.h b/client/proxgui.h index 0d43e7823..613f793d1 100644 --- a/client/proxgui.h +++ b/client/proxgui.h @@ -8,6 +8,9 @@ // GUI functions //----------------------------------------------------------------------------- +#ifndef __PROXGUI_H +#define __PROXGUI_H + #ifdef __cplusplus extern "C" { #endif @@ -53,3 +56,4 @@ extern uint8_t g_debugMode; #ifdef __cplusplus } #endif +#endif diff --git a/client/reveng/getopt.h b/client/reveng/getopt.h index bf66d9b13..c4b77d31e 100644 --- a/client/reveng/getopt.h +++ b/client/reveng/getopt.h @@ -20,6 +20,11 @@ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef __GETOPT_H +#define __GETOPT_H + extern char *optarg; extern int optind, opterr, optopt, pos; int getopt(int argc, char *argv[], const char *optstring); + +#endif diff --git a/client/tinycbor/tinycbor-version.h b/client/tinycbor/tinycbor-version.h index 29967d025..e1865cee3 100644 --- a/client/tinycbor/tinycbor-version.h +++ b/client/tinycbor/tinycbor-version.h @@ -1,3 +1,6 @@ +#ifndef __TINYCBOR_VERSION_H +#define __TINYCBOR_VERSION_H #define TINYCBOR_VERSION_MAJOR 0 #define TINYCBOR_VERSION_MINOR 5 #define TINYCBOR_VERSION_PATCH 3 +#endif