From: Victor Julien Date: Tue, 1 Oct 2019 09:59:58 +0000 (+0200) Subject: classtype: reduce scope of functions X-Git-Tag: suricata-5.0.0~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e104c3d9130d0f9e9533dbc8e71a7e0bc07ef7fc;p=thirdparty%2Fsuricata.git classtype: reduce scope of functions --- diff --git a/src/util-classification-config.c b/src/util-classification-config.c index b4dbf37ead..2978b71a78 100644 --- a/src/util-classification-config.c +++ b/src/util-classification-config.c @@ -56,6 +56,10 @@ char SCClassConfClasstypeHashCompareFunc(void *data1, uint16_t datalen1, void SCClassConfClasstypeHashFree(void *ch); static const char *SCClassConfGetConfFilename(const DetectEngineCtx *de_ctx); +static SCClassConfClasstype *SCClassConfAllocClasstype(uint8_t classtype_id, + const char *classtype, const char *classtype_desc, int priority); +static void SCClassConfDeAllocClasstype(SCClassConfClasstype *ct); + void SCClassConfInit(void) { const char *eb = NULL; @@ -374,6 +378,7 @@ static void SCClassConfParseFile(DetectEngineCtx *de_ctx, FILE *fd) } /** + * \internal * \brief Returns a new SCClassConfClasstype instance. The classtype string * is converted into lowercase, before being assigned to the instance. * @@ -384,7 +389,7 @@ static void SCClassConfParseFile(DetectEngineCtx *de_ctx, FILE *fd) * \retval ct Pointer to the new instance of SCClassConfClasstype on success; * NULL on failure. */ -SCClassConfClasstype *SCClassConfAllocClasstype(uint8_t classtype_id, +static SCClassConfClasstype *SCClassConfAllocClasstype(uint8_t classtype_id, const char *classtype, const char *classtype_desc, int priority) @@ -420,11 +425,12 @@ SCClassConfClasstype *SCClassConfAllocClasstype(uint8_t classtype_id, } /** + * \internal * \brief Frees a SCClassConfClasstype instance * * \param Pointer to the SCClassConfClasstype instance that has to be freed */ -void SCClassConfDeAllocClasstype(SCClassConfClasstype *ct) +static void SCClassConfDeAllocClasstype(SCClassConfClasstype *ct) { if (ct != NULL) { if (ct->classtype != NULL) diff --git a/src/util-classification-config.h b/src/util-classification-config.h index 7e916c2cd2..b161c54081 100644 --- a/src/util-classification-config.h +++ b/src/util-classification-config.h @@ -42,9 +42,6 @@ typedef struct SCClassConfClasstype_ { int priority; } SCClassConfClasstype; -SCClassConfClasstype *SCClassConfAllocClasstype(uint8_t, const char *, - const char *, int); -void SCClassConfDeAllocClasstype(SCClassConfClasstype *); void SCClassConfLoadClassficationConfigFile(DetectEngineCtx *, FILE *fd); SCClassConfClasstype *SCClassConfGetClasstype(const char *, DetectEngineCtx *);