]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: use debug validate macro 11112/head
authorShivani Bhardwaj <shivani@oisf.net>
Tue, 21 May 2024 11:51:53 +0000 (17:21 +0530)
committerVictor Julien <victor@inliniac.net>
Wed, 22 May 2024 04:45:11 +0000 (06:45 +0200)
src/flow.h

index 9905c410b26cf23dca507b8508eee489a43313c2..d633554243c071ce0ce365a6f3b997fec5133ee1 100644 (file)
@@ -33,6 +33,7 @@ typedef struct FlowStorageId FlowStorageId;
 #include "util-exception-policy-types.h"
 #include "util-var.h"
 #include "util-optimize.h"
+#include "util-validate.h"
 #include "app-layer-protos.h"
 
 /* Part of the flow structure, so we declare it here.
@@ -636,12 +637,9 @@ static inline void FlowSetNoPayloadInspectionFlag(Flow *f)
 static inline void FlowReference(Flow **d, Flow *f)
 {
     if (likely(f != NULL)) {
-#ifdef DEBUG_VALIDATION
-        BUG_ON(*d == f);
-#else
+        DEBUG_VALIDATE_BUG_ON(*d == f);
         if (*d == f)
             return;
-#endif
         *d = f;
     }
 }