From: Shivani Bhardwaj Date: Tue, 21 May 2024 11:51:53 +0000 (+0530) Subject: flow: use debug validate macro X-Git-Tag: suricata-8.0.0-beta1~1287 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0aaec69303f3ff1d56a180e107995585c89eabf7;p=thirdparty%2Fsuricata.git flow: use debug validate macro --- diff --git a/src/flow.h b/src/flow.h index 9905c410b2..d633554243 100644 --- a/src/flow.h +++ b/src/flow.h @@ -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; } }