From 5483b800c5961d30f9e5a5cde88e8765d4405a14 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 9 Jun 2015 11:43:26 +0200 Subject: [PATCH] detect: remove struct/union tricks from Signature --- src/detect.h | 37 +++++++++++++------------------------ 1 file changed, 13 insertions(+), 24 deletions(-) diff --git a/src/detect.h b/src/detect.h index fbed549fe1..75a0a3436b 100644 --- a/src/detect.h +++ b/src/detect.h @@ -366,30 +366,19 @@ typedef struct SigMatchData_ { /** \brief Signature container */ typedef struct Signature_ { - union { - struct { - /* coccinelle: Signature:flags:SIG_FLAG */ - uint32_t flags; - AppProto alproto; - uint16_t dsize_low; - }; - uint64_t hdr_copy1; - }; - union { - struct { - uint16_t dsize_high; - uint16_t mpm_pattern_id_div_8; - }; - uint32_t hdr_copy2; - }; - union { - struct { - uint8_t mpm_pattern_id_mod_8; - SignatureMask mask; - SigIntId num; /**< signature number, internal id */ - }; - uint32_t hdr_copy3; - }; + /* coccinelle: Signature:flags:SIG_FLAG */ + uint32_t flags; + + AppProto alproto; + + uint16_t dsize_low; + uint16_t dsize_high; + + uint16_t mpm_pattern_id_div_8; + uint8_t mpm_pattern_id_mod_8; + + SignatureMask mask; + SigIntId num; /**< signature number, internal id */ /** inline -- action */ uint8_t action;