]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
packetpool: use DEBUG_VALIDATE statement
authorShivani Bhardwaj <shivani@oisf.net>
Thu, 13 Jun 2024 13:04:40 +0000 (18:34 +0530)
committerVictor Julien <victor@inliniac.net>
Sat, 22 Jun 2024 13:54:34 +0000 (15:54 +0200)
src/tmqh-packetpool.c

index df27577252a9235572b4a7e36e5c295c2783f194..2b0515cca2f718d15f6685ab99289eb729af2b7e 100644 (file)
@@ -127,10 +127,8 @@ static void PacketPoolGetReturnedPackets(PktPool *pool)
 Packet *PacketPoolGetPacket(void)
 {
     PktPool *pool = GetThreadPacketPool();
-#ifdef DEBUG_VALIDATION
-    BUG_ON(pool->initialized == 0);
-    BUG_ON(pool->destroyed == 1);
-#endif /* DEBUG_VALIDATION */
+    DEBUG_VALIDATE_BUG_ON(pool->initialized == 0);
+    DEBUG_VALIDATE_BUG_ON(pool->destroyed == 1);
     if (pool->head) {
         /* Stack is not empty. */
         Packet *p = pool->head;