]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Mark pflow as a constant pointer.
authorKen Steele <ken@tilera.com>
Tue, 10 Dec 2013 20:14:49 +0000 (15:14 -0500)
committerVictor Julien <victor@inliniac.net>
Wed, 11 Dec 2013 10:48:21 +0000 (11:48 +0100)
Address review comment from Victor that the pflow pointer is constant, so
it can be marked as such.

src/detect.c

index fd09784daccbb15f9c9410d0fd3d399864148c4c..c0dc76b599b454db1383c71e2ade6281e60479e5 100644 (file)
@@ -1122,8 +1122,10 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
         SCReturnInt(0);
     }
 
-    /* Load the Packet's flow early, even though it might not be needed */
-    Flow *pflow = p->flow;
+    /* Load the Packet's flow early, even though it might not be needed.
+     * Mark as a constant pointer, although the flow can change.
+     */
+    Flow * const pflow = p->flow;
 
     /* grab the protocol state we will detect on */
     if (p->flags & PKT_HAS_FLOW) {