]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
mpm: assume we'll likely have a mpm_ctx
authorVictor Julien <victor@inliniac.net>
Sat, 19 Sep 2015 11:57:57 +0000 (13:57 +0200)
committerVictor Julien <victor@inliniac.net>
Sat, 19 Sep 2015 15:51:36 +0000 (17:51 +0200)
src/detect-engine-mpm.c

index bc092cdfecdc44e85ac85a6c8760df856e9db466..adf46267512471c9b28ba727dd56af8c46fd4971 100644 (file)
@@ -232,8 +232,7 @@ uint32_t PacketPatternSearch(DetectEngineThreadCtx *det_ctx, Packet *p)
     } else {
         mpm_ctx = det_ctx->sgh->mpm_proto_other_ctx;
     }
-
-    if (mpm_ctx == NULL)
+    if (unlikely(mpm_ctx == NULL))
         SCReturnInt(0);
 
 #ifdef __SC_CUDA_SUPPORT__