diff --git a/src/app-layer-htp.c b/src/app-layer-htp.c index 280cb72b84..9d8e163d87 100644 --- a/src/app-layer-htp.c +++ b/src/app-layer-htp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2013 Open Information Security Foundation +/* Copyright (C) 2007-2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -212,6 +212,9 @@ static void *HTPStateGetTx(void *alstate, uint64_t tx_id); static int HTPStateGetAlstateProgress(void *tx, uint8_t direction); static uint64_t HTPStateGetTxCnt(void *alstate); static int HTPStateGetAlstateProgressCompletionStatus(uint8_t direction); +#ifdef UNITTESTS +static void HTPParserRegisterTests(void); +#endif static inline uint64_t HtpGetActiveRequestTxID(HtpState *s) { @@ -7386,14 +7389,12 @@ static int HTPParserTest27(void) PASS; } -#endif /* UNITTESTS */ /** * \brief Register the Unit tests for the HTTP protocol */ -void HTPParserRegisterTests(void) +static void HTPParserRegisterTests(void) { -#ifdef UNITTESTS UtRegisterTest("HTPParserTest01", HTPParserTest01); UtRegisterTest("HTPParserTest01a", HTPParserTest01a); UtRegisterTest("HTPParserTest01b", HTPParserTest01b); @@ -7448,8 +7449,8 @@ void HTPParserRegisterTests(void) HTPFileParserRegisterTests(); HTPXFFParserRegisterTests(); -#endif /* UNITTESTS */ } +#endif /* UNITTESTS */ /** * @} diff --git a/src/app-layer-htp.h b/src/app-layer-htp.h index 6be50fda38..72acc41d3a 100644 --- a/src/app-layer-htp.h +++ b/src/app-layer-htp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2011 Open Information Security Foundation +/* Copyright (C) 2007-2020 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -271,7 +271,6 @@ typedef struct HtpState_ { SC_ATOMIC_EXTERN(uint32_t, htp_config_flags); void RegisterHTPParsers(void); -void HTPParserRegisterTests(void); void HTPAtExitPrintStats(void); void HTPFreeConfig(void);