We can reuse the type for hostbits and flowbits as well.
return r;
}
-void XBitFree(XBit *fb)
-{
- if (fb == NULL)
- return;
-
- SCFree(fb);
-}
-
/* TESTS */
#ifdef UNITTESTS
#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);
#include "util-debug.h"
+static void XBitFree(XBit *fb)
+{
+ if (fb == NULL)
+ return;
+
+ SCFree(fb);
+}
+
void GenericVarFree(GenericVar *gv)
{
if (gv == NULL)
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 *);