From 645a04c233346fc4c5446cff661d3faa73b232b2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 6 Feb 2022 08:06:39 +0100 Subject: [PATCH] output: declare OutputLoggerThreadStore once --- src/output-file.c | 5 ----- src/output-filedata.c | 5 ----- src/output-flow.c | 6 +----- src/output-packet.c | 5 ----- src/output-streaming.c | 5 ----- src/output-tx.c | 5 ----- src/output.h | 7 ++++++- 7 files changed, 7 insertions(+), 31 deletions(-) diff --git a/src/output-file.c b/src/output-file.c index e12d0146a..b05686d32 100644 --- a/src/output-file.c +++ b/src/output-file.c @@ -36,11 +36,6 @@ bool g_file_logger_enabled = false; -typedef struct OutputLoggerThreadStore_ { - void *thread_data; - struct OutputLoggerThreadStore_ *next; -} OutputLoggerThreadStore; - /** per thread data for this module, contains a list of per thread * data for the packet loggers. */ typedef struct OutputLoggerThreadData_ { diff --git a/src/output-filedata.c b/src/output-filedata.c index 7d0ead85a..8a990d710 100644 --- a/src/output-filedata.c +++ b/src/output-filedata.c @@ -37,11 +37,6 @@ bool g_filedata_logger_enabled = false; -typedef struct OutputLoggerThreadStore_ { - void *thread_data; - struct OutputLoggerThreadStore_ *next; -} OutputLoggerThreadStore; - /** per thread data for this module, contains a list of per thread * data for the packet loggers. */ typedef struct OutputLoggerThreadData_ { diff --git a/src/output-flow.c b/src/output-flow.c index 1dc4ee910..cd6440d42 100644 --- a/src/output-flow.c +++ b/src/output-flow.c @@ -25,15 +25,11 @@ #include "suricata-common.h" #include "tm-modules.h" +#include "output.h" #include "output-flow.h" #include "util-profiling.h" #include "util-validate.h" -typedef struct OutputLoggerThreadStore_ { - void *thread_data; - struct OutputLoggerThreadStore_ *next; -} OutputLoggerThreadStore; - /** per thread data for this module, contains a list of per thread * data for the packet loggers. */ typedef struct OutputLoggerThreadData_ { diff --git a/src/output-packet.c b/src/output-packet.c index e18bc4448..4920cca4f 100644 --- a/src/output-packet.c +++ b/src/output-packet.c @@ -30,11 +30,6 @@ #include "util-profiling.h" #include "util-validate.h" -typedef struct OutputLoggerThreadStore_ { - void *thread_data; - struct OutputLoggerThreadStore_ *next; -} OutputLoggerThreadStore; - /** per thread data for this module, contains a list of per thread * data for the packet loggers. */ typedef struct OutputLoggerThreadData_ { diff --git a/src/output-streaming.c b/src/output-streaming.c index 7cfc0218e..584021772 100644 --- a/src/output-streaming.c +++ b/src/output-streaming.c @@ -38,11 +38,6 @@ #include "stream-tcp-reassemble.h" #include "util-validate.h" -typedef struct OutputLoggerThreadStore_ { - void *thread_data; - struct OutputLoggerThreadStore_ *next; -} OutputLoggerThreadStore; - /** per thread data for this module, contains a list of per thread * data for the packet loggers. */ typedef struct OutputLoggerThreadData_ { diff --git a/src/output-tx.c b/src/output-tx.c index 36996a33f..716db1695 100644 --- a/src/output-tx.c +++ b/src/output-tx.c @@ -32,11 +32,6 @@ #include "util-profiling.h" #include "util-validate.h" -typedef struct OutputLoggerThreadStore_ { - void *thread_data; - struct OutputLoggerThreadStore_ *next; -} OutputLoggerThreadStore; - /** per thread data for this module, contains a list of per thread * data for the packet loggers. */ typedef struct OutputLoggerThreadData_ { diff --git a/src/output.h b/src/output.h index f9d1a0ada..3f73a1bad 100644 --- a/src/output.h +++ b/src/output.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2007-2010 Open Information Security Foundation +/* Copyright (C) 2007-2022 Open Information Security Foundation * * You can copy, redistribute or modify this Program under the terms of * the GNU General Public License version 2 as published by the Free @@ -40,6 +40,11 @@ #include "util-config.h" +typedef struct OutputLoggerThreadStore_ { + void *thread_data; + struct OutputLoggerThreadStore_ *next; +} OutputLoggerThreadStore; + typedef struct OutputInitResult_ { OutputCtx *ctx; bool ok; -- 2.47.3