From: Victor Julien Date: Tue, 30 Nov 2021 12:35:48 +0000 (+0100) Subject: detect: use bool for uint16_t used as bool X-Git-Tag: suricata-6.0.6~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4a556c93619d905c9b6b16dfda58f2dd418e794;p=thirdparty%2Fsuricata.git detect: use bool for uint16_t used as bool (cherry picked from commit bb3d49d5bf6376756e124a79b4f25799d934617c) --- 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;