From: Victor Julien Date: Mon, 15 Aug 2022 12:37:22 +0000 (+0200) Subject: stream: minor code cleanup X-Git-Tag: suricata-7.0.0-beta1~260 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55b2077fcd7b31e141162eaabd2892487716bae8;p=thirdparty%2Fsuricata.git stream: minor code cleanup --- diff --git a/src/stream-tcp-list.c b/src/stream-tcp-list.c index 7dde2b0ea9..cbd3c4e818 100644 --- a/src/stream-tcp-list.c +++ b/src/stream-tcp-list.c @@ -760,22 +760,10 @@ static inline uint64_t GetLeftEdgeForApp(Flow *f, TcpSession *ssn, TcpStream *st static inline uint64_t GetLeftEdge(Flow *f, TcpSession *ssn, TcpStream *stream) { - bool use_app = true; - bool use_raw = true; - bool use_log = true; - uint64_t left_edge = 0; - if ((ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED)) { - use_app = false; // app is dead - } - - if (stream->flags & STREAMTCP_STREAM_FLAG_DISABLE_RAW) { - use_raw = false; // raw is dead - } - if (!stream_config.streaming_log_api) { - use_log = false; - } - + const bool use_app = !(ssn->flags & STREAMTCP_FLAG_APP_LAYER_DISABLED); + const bool use_raw = !(stream->flags & STREAMTCP_STREAM_FLAG_DISABLE_RAW); + const bool use_log = stream_config.streaming_log_api; SCLogDebug("use_app %d use_raw %d use_log %d", use_app, use_raw, use_log); if (use_raw) {