From 5a1bc025e59e63d96f73320178fb9d98fcd1c153 Mon Sep 17 00:00:00 2001 From: Ken Steele Date: Tue, 10 Dec 2013 15:14:49 -0500 Subject: [PATCH] Mark pflow as a constant pointer. Address review comment from Victor that the pflow pointer is constant, so it can be marked as such. --- src/detect.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/detect.c b/src/detect.c index fd09784dac..c0dc76b599 100644 --- a/src/detect.c +++ b/src/detect.c @@ -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) {