From b62a513c4734ddaaf1ac195918ca352ac8c075d7 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 22 Jan 2023 08:05:58 +0100 Subject: [PATCH] flow: inline commonly used getters --- src/flow.c | 10 ---------- src/flow.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/flow.c b/src/flow.c index a82165971a..1685bfb1cb 100644 --- a/src/flow.c +++ b/src/flow.c @@ -1143,16 +1143,6 @@ int FlowSetProtoFreeFunc (uint8_t proto, void (*Free)(void *)) return 1; } -AppProto FlowGetAppProtocol(const Flow *f) -{ - return f->alproto; -} - -void *FlowGetAppState(const Flow *f) -{ - return f->alstate; -} - /** * \brief get 'disruption' flags: GAP/DEPTH/PASS * \param f locked flow diff --git a/src/flow.h b/src/flow.h index ac9c314dab..3431b2cd6f 100644 --- a/src/flow.h +++ b/src/flow.h @@ -605,6 +605,16 @@ uint16_t FlowGetDestinationPort(Flow *flow); /** ----- Inline functions ----- */ +static inline AppProto FlowGetAppProtocol(const Flow *f) +{ + return f->alproto; +} + +static inline void *FlowGetAppState(const Flow *f) +{ + return f->alstate; +} + /** \brief Set the No Packet Inspection Flag without locking the flow. * * \param f Flow to set the flag in -- 2.47.2