From: Ken Steele Date: Tue, 10 Dec 2013 20:14:49 +0000 (-0500) Subject: Mark pflow as a constant pointer. X-Git-Tag: suricata-2.0beta2~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a1bc025e59e63d96f73320178fb9d98fcd1c153;p=thirdparty%2Fsuricata.git Mark pflow as a constant pointer. Address review comment from Victor that the pflow pointer is constant, so it can be marked as such. --- 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) {