]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: use bool for uint16_t used as bool
authorVictor Julien <vjulien@oisf.net>
Tue, 30 Nov 2021 12:35:48 +0000 (13:35 +0100)
committerVictor Julien <vjulien@oisf.net>
Fri, 3 Dec 2021 15:28:20 +0000 (16:28 +0100)
src/detect.c
src/detect.h

index 8b6ff9c8ebea556ef7479d52e0dcc739ee92f425..410ccb1f76abe0e89c42b5df4901998cb35a2e53 100644 (file)
@@ -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 */
index 3f86b5de69c3551edaa4043abb5242579b91225d..c3bb491305beaf05434444e9f42e1156e51d0704 100644 (file)
@@ -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;