]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: minor cleanups
authorVictor Julien <victor@inliniac.net>
Mon, 18 Jul 2016 08:50:29 +0000 (10:50 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 29 Aug 2016 09:46:58 +0000 (11:46 +0200)
src/detect.c

index 141e819105276e036bd90fc98c2aae14677ff4dc..4abf58cd66e37dd88a175f3ad31527f7c776a334 100644 (file)
@@ -3505,9 +3505,6 @@ int SigAddressPrepareStage1(DetectEngineCtx *de_ctx)
     uint32_t cnt_applayer = 0;
     uint32_t cnt_deonly = 0;
 
-    //DetectAddressPrintMemory();
-    //DetectPortPrintMemory();
-
     if (!(de_ctx->flags & DE_QUIET)) {
         SCLogDebug("building signature grouping structure, stage 1: "
                    "preprocessing rules...");
@@ -3600,9 +3597,6 @@ int SigAddressPrepareStage1(DetectEngineCtx *de_ctx)
         de_ctx->sig_cnt++;
     }
 
-    //DetectAddressPrintMemory();
-    //DetectPortPrintMemory();
-
     if (!(de_ctx->flags & DE_QUIET)) {
         SCLogInfo("%" PRIu32 " signatures processed. %" PRIu32 " are IP-only "
                 "rules, %" PRIu32 " are inspecting packet payload, %"PRIu32
@@ -4104,7 +4098,7 @@ int SigGroupBuild(DetectEngineCtx *de_ctx)
         SCLogError(SC_ERR_DETECT_PREPARE, "initializing the detection engine failed");
         exit(EXIT_FAILURE);
     }
-//exit(0);
+
     if (SigAddressPrepareStage2(de_ctx) != 0) {
         SCLogError(SC_ERR_DETECT_PREPARE, "initializing the detection engine failed");
         exit(EXIT_FAILURE);
@@ -4119,8 +4113,8 @@ int SigGroupBuild(DetectEngineCtx *de_ctx)
         exit(EXIT_FAILURE);
     }
 
-    if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
 #ifdef __SC_CUDA_SUPPORT__
+    if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
         if (PatternMatchDefaultMatcher() == MPM_AC_CUDA) {
             /* setting it to default.  You've gotta remove it once you fix the state table thing */
             SCACConstructBoth16and32StateTables();
@@ -4137,8 +4131,7 @@ int SigGroupBuild(DetectEngineCtx *de_ctx)
                 exit(EXIT_FAILURE);
             }
         }
-#endif
-#ifdef __SC_CUDA_SUPPORT__
+
         if (PatternMatchDefaultMatcher() == MPM_AC_CUDA) {
             int r = SCCudaCtxPopCurrent(NULL);
             if (r < 0) {
@@ -4150,14 +4143,12 @@ int SigGroupBuild(DetectEngineCtx *de_ctx)
         /* too late to call this either ways.  Should be called post ac goto.
          * \todo Support this. */
         DetermineCudaStateTableSize(de_ctx);
-#endif
     }
+#endif
+
     DetectMpmPrepareBuiltinMpms(de_ctx);
     DetectMpmPrepareAppMpms(de_ctx);
 
-//    DetectAddressPrintMemory();
-//    DetectPortPrintMemory();
-
     if (SigMatchPrepare(de_ctx) != 0) {
         SCLogError(SC_ERR_DETECT_PREPARE, "initializing the detection engine failed");
         exit(EXIT_FAILURE);