From: Eric Leblond Date: Fri, 6 Mar 2015 21:17:30 +0000 (+0100) Subject: flow: constify getters param X-Git-Tag: suricata-2.1beta4~174 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54b13851cc390eb1a7963d564a6a1c6d733ccd50;p=thirdparty%2Fsuricata.git flow: constify getters param Some potential callers are already using constified values so it is good to do it. --- diff --git a/src/flow.c b/src/flow.c index 3255bbf58a..4e9b684806 100644 --- a/src/flow.c +++ b/src/flow.c @@ -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; } diff --git a/src/flow.h b/src/flow.h index 8d699fc98d..48b4b075c0 100644 --- a/src/flow.h +++ b/src/flow.h @@ -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);