From f4a556c93619d905c9b6b16dfda58f2dd418e794 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 30 Nov 2021 13:35:48 +0100 Subject: [PATCH] detect: use bool for uint16_t used as bool (cherry picked from commit bb3d49d5bf6376756e124a79b4f25799d934617c) --- src/detect.c | 4 ++-- src/detect.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/detect.c b/src/detect.c index 3a5c7c6a63..49ea27a814 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1419,7 +1419,7 @@ static void DetectRunTx(ThreadVars *tv, } det_ctx->tx_id = tx.tx_id; - det_ctx->tx_id_set = 1; + det_ctx->tx_id_set = true; det_ctx->p = p; /* run rules: inspect the match candidates */ @@ -1487,7 +1487,7 @@ static void DetectRunTx(ThreadVars *tv, } det_ctx->tx_id = 0; - det_ctx->tx_id_set = 0; + det_ctx->tx_id_set = false; det_ctx->p = NULL; /* see if we have any updated state to store in the tx */ diff --git a/src/detect.h b/src/detect.h index ed5daa3861..209e9036c3 100644 --- a/src/detect.h +++ b/src/detect.h @@ -1082,8 +1082,8 @@ typedef struct DetectEngineThreadCtx_ { uint16_t discontinue_matching; uint16_t flags; - /* bool: if tx_id is set, this is 1, otherwise 0 */ - uint16_t tx_id_set; + /* true if tx_id is set */ + bool tx_id_set; /** ID of the transaction currently being inspected. */ uint64_t tx_id; Packet *p; -- 2.47.2