]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: constify getters param
authorEric Leblond <eric@regit.org>
Fri, 6 Mar 2015 21:17:30 +0000 (22:17 +0100)
committerEric Leblond <eric@regit.org>
Fri, 6 Mar 2015 21:19:59 +0000 (22:19 +0100)
Some potential callers are already using constified values so it
is good to do it.

src/flow.c
src/flow.h

index 3255bbf58adfcc88b9b256bd54b9b2589bac036e..4e9b6848069f812904d7075b64668ad96d641578 100644 (file)
@@ -860,12 +860,12 @@ int FlowSetProtoEmergencyTimeout(uint8_t proto, uint32_t emerg_new_timeout,
     return 1;
 }
 
-AppProto FlowGetAppProtocol(Flow *f)
+AppProto FlowGetAppProtocol(const Flow *f)
 {
     return f->alproto;
 }
 
-void *FlowGetAppState(Flow *f)
+void *FlowGetAppState(const Flow *f)
 {
     return f->alstate;
 }
index 8d699fc98d4c16bc7cda0ed56056dc88c445913d..48b4b075c0aeb8f2354450c5e6cffbe9071c5b35 100644 (file)
@@ -574,8 +574,8 @@ static inline void FlowDeReference(Flow **d)
 
 int FlowClearMemory(Flow *,uint8_t );
 
-AppProto FlowGetAppProtocol(Flow *f);
-void *FlowGetAppState(Flow *f);
+AppProto FlowGetAppProtocol(const Flow *f);
+void *FlowGetAppState(const Flow *f);
 
 void FlowHandlePacketUpdateRemove(Flow *f, Packet *p);
 void FlowHandlePacketUpdate(Flow *f, Packet *p);