From 446e68adca0aaebc23bb3a6bc78f4ecaba6d3737 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 10 Jan 2014 10:15:48 +0100 Subject: [PATCH] app-layer: only typedef opaque pointers once --- src/app-layer-detect-proto.c | 4 ++-- src/app-layer-parser.c | 8 ++++---- src/app-layer.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index 7cf21de0be..35f0c85d59 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -151,11 +151,11 @@ typedef struct AppLayerProtoDetectCtx_ { /** * \brief The app layer protocol detection thread context. */ -typedef struct AppLayerProtoDetectThreadCtx_ { +struct AppLayerProtoDetectThreadCtx_ { PatternMatcherQueue pmq; /* The value 2 is for direction(0 - toserver, 1 - toclient). */ MpmThreadCtx mpm_tctx[FLOW_PROTO_DEFAULT][2]; -} AppLayerProtoDetectThreadCtx; +}; /* The global app layer proto detection context. */ AppLayerProtoDetectCtx alpd_ctx; diff --git a/src/app-layer-parser.c b/src/app-layer-parser.c index 530e5b9620..843fa2b91c 100644 --- a/src/app-layer-parser.c +++ b/src/app-layer-parser.c @@ -68,9 +68,9 @@ #include "runmodes.h" -typedef struct AppLayerParserThreadCtx_ { +struct AppLayerParserThreadCtx_ { void *alproto_local_storage[FLOW_PROTO_MAX][ALPROTO_MAX]; -} AppLayerParserThreadCtx; +}; /** @@ -117,7 +117,7 @@ typedef struct AppLayerParserCtx_ { AppLayerParserProtoCtx ctxs[FLOW_PROTO_MAX][ALPROTO_MAX]; } AppLayerParserCtx; -typedef struct AppLayerParserState_ { +struct AppLayerParserState_ { uint8_t flags; /* Indicates the current transaction that is being inspected. @@ -132,7 +132,7 @@ typedef struct AppLayerParserState_ { /* Used to store decoder events. */ AppLayerDecoderEvents *decoder_events; -} AppLayerParserState; +}; /* Static global version of the parser context. * Post 2.0 let's look at changing this to move it out to app-layer.c. */ diff --git a/src/app-layer.c b/src/app-layer.c index e50818b0b8..29d97b8d2e 100644 --- a/src/app-layer.c +++ b/src/app-layer.c @@ -46,7 +46,7 @@ * \brief This is for the app layer in general and it contains per thread * context relevant to both the alpd and alp. */ -typedef struct AppLayerThreadCtx_ { +struct AppLayerThreadCtx_ { /* App layer protocol detection thread context, from AppLayerProtoDetectGetCtxThread(). */ AppLayerProtoDetectThreadCtx *alpd_tctx; /* App layer parser thread context, from AppLayerParserThreadCtxAlloc(). */ @@ -61,7 +61,7 @@ typedef struct AppLayerThreadCtx_ { uint64_t proto_detect_ticks_end; uint64_t proto_detect_ticks_spent; #endif -} AppLayerThreadCtx; +}; /***** L7 layer dispatchers *****/ -- 2.47.2