]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: minor profiling cleanup
authorVictor Julien <victor@inliniac.net>
Sun, 8 Oct 2017 16:20:18 +0000 (18:20 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 24 Nov 2017 09:14:37 +0000 (10:14 +0100)
src/detect.c

index 91dbaa379e645958cabd60a81d01e9d47ce09639..0e7a6437a282f4e454a0d73add7345fb0d9b6ac1 100644 (file)
@@ -894,9 +894,6 @@ void SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineT
     bool use_flow_sgh = false;
     uint8_t alert_flags = 0;
     AppProto alproto = ALPROTO_UNKNOWN;
-#ifdef PROFILING
-    int smatch = 0; /* signature match: 1, no match: 0 */
-#endif
     uint8_t flow_flags = 0; /* flow/state flags */
     const Signature *s = NULL;
     const Signature *next_s = NULL;
@@ -1147,7 +1144,7 @@ void SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineT
         RULE_PROFILING_START(p);
         state_alert = 0;
 #ifdef PROFILING
-        smatch = 0;
+        bool smatch = false; /* signature match */
 #endif
         s = next_s;
         sflags = next_sflags;
@@ -1361,7 +1358,7 @@ void SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineT
         }
 
 #ifdef PROFILING
-        smatch = 1;
+        smatch = true;
 #endif
 
         SigMatchSignaturesRunPostMatch(th_v, de_ctx, det_ctx, p, s);