diff --git a/src/ippair-bit.c b/src/ippair-bit.c index 0a38568786..5a72288867 100644 --- a/src/ippair-bit.c +++ b/src/ippair-bit.c @@ -156,14 +156,6 @@ int IPPairBitIsnotset(IPPair *h, uint16_t idx) return r; } -void XBitFree(XBit *fb) -{ - if (fb == NULL) - return; - - SCFree(fb); -} - /* TESTS */ #ifdef UNITTESTS diff --git a/src/ippair-bit.h b/src/ippair-bit.h index 43019c920e..e44c0320a9 100644 --- a/src/ippair-bit.h +++ b/src/ippair-bit.h @@ -27,18 +27,7 @@ #include "ippair.h" #include "util-var.h" -typedef struct XBit_ { - uint8_t type; /* type, DETECT_XBITS in this case */ - uint16_t idx; /* name idx */ - GenericVar *next; /* right now just implement this as a list, - * in the long run we have think of something - * faster. */ -} XBit; - -void XBitFree(XBit *fb); - void IPPairBitInitCtx(void); -void IPPairBitFree(XBit *); void IPPairBitRegisterTests(void); int IPPairHasIPPairBits(IPPair *host); diff --git a/src/util-var.c b/src/util-var.c index fb0b1f4a99..0ba93deb45 100644 --- a/src/util-var.c +++ b/src/util-var.c @@ -36,6 +36,14 @@ #include "util-debug.h" +static void XBitFree(XBit *fb) +{ + if (fb == NULL) + return; + + SCFree(fb); +} + void GenericVarFree(GenericVar *gv) { if (gv == NULL) diff --git a/src/util-var.h b/src/util-var.h index 5d28cc7cc1..2190722796 100644 --- a/src/util-var.h +++ b/src/util-var.h @@ -30,6 +30,12 @@ typedef struct GenericVar_ { struct GenericVar_ *next; } GenericVar; +typedef struct XBit_ { + uint8_t type; /* type, DETECT_XBITS in this case */ + uint16_t idx; /* name idx */ + GenericVar *next; +} XBit; + void GenericVarFree(GenericVar *); void GenericVarAppend(GenericVar **, GenericVar *); void GenericVarRemove(GenericVar **, GenericVar *);