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-7.0.0-beta1~1140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb3d49d5bf6376756e124a79b4f25799d934617c;p=thirdparty%2Fsuricata.git detect: use bool for uint16_t used as bool --- diff --git a/src/detect.c b/src/detect.c index 8b6ff9c8eb..410ccb1f76 100644 --- a/src/detect.c +++ b/src/detect.c @@ -1408,7 +1408,7 @@ static void DetectRunTx(ThreadVars *tv, RulesDumpTxMatchArray(det_ctx, scratch->sgh, p, tx.tx_id, array_idx, x); #endif 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 */ @@ -1476,7 +1476,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 3f86b5de69..c3bb491305 100644 --- a/src/detect.h +++ b/src/detect.h @@ -1066,8 +1066,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;