]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: minor cleanups
authorVictor Julien <victor@inliniac.net>
Sun, 8 Oct 2017 11:15:12 +0000 (13:15 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 24 Nov 2017 09:14:36 +0000 (10:14 +0100)
src/detect.c

index 605b2a97f35de9a97b5023bda67eef5b834f3086..2515b3365cdc3ed8ab2bc202b11affcbfc556fd7 100644 (file)
@@ -238,11 +238,6 @@ extern int engine_analysis;
 static int fp_engine_analysis_set = 0;
 static int rule_engine_analysis_set = 0;
 
-SigMatch *SigMatchAlloc(void);
-void DetectExitPrintStats(ThreadVars *tv, void *data);
-
-void DbgPrintSigs(DetectEngineCtx *, SigGroupHead *);
-void DbgPrintSigs2(DetectEngineCtx *, SigGroupHead *);
 static void PacketCreateMask(Packet *, SignatureMask *, AppProto, bool, int);
 
 /**
@@ -1469,8 +1464,6 @@ void DetectSignatureApplyActions(Packet *p,
     }
 }
 
-/* tm module api functions */
-
 static DetectEngineThreadCtx *GetTenantById(HashTable *h, uint32_t id)
 {
     /* technically we need to pass a DetectEngineThreadCtx struct with the
@@ -3351,36 +3344,6 @@ int SigAddressCleanupStage1(DetectEngineCtx *de_ctx)
     return 0;
 }
 
-void DbgPrintSigs(DetectEngineCtx *de_ctx, SigGroupHead *sgh)
-{
-    if (sgh == NULL) {
-        printf("\n");
-        return;
-    }
-
-    uint32_t sig;
-    for (sig = 0; sig < sgh->sig_cnt; sig++) {
-        printf("%" PRIu32 " ", sgh->match_array[sig]->id);
-    }
-    printf("\n");
-}
-
-void DbgPrintSigs2(DetectEngineCtx *de_ctx, SigGroupHead *sgh)
-{
-    if (sgh == NULL || sgh->init == NULL) {
-        printf("\n");
-        return;
-    }
-
-    uint32_t sig;
-    for (sig = 0; sig < DetectEngineGetMaxSigId(de_ctx); sig++) {
-        if (sgh->init->sig_array[(sig/8)] & (1<<(sig%8))) {
-            printf("%" PRIu32 " ", de_ctx->sig_array[sig]->id);
-        }
-    }
-    printf("\n");
-}
-
 /** \brief finalize preparing sgh's */
 int SigAddressPrepareStage4(DetectEngineCtx *de_ctx)
 {