From 2e2eaac0b21fa9e66c3ac95ae157ea4aa581e25b Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Wed, 27 Nov 2024 13:29:11 -0600 Subject: [PATCH] output-json: cleanup, have OutputJsonBuilderBuffer return void The return value was never used. --- src/output-json.c | 6 ++---- src/output-json.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/output-json.c b/src/output-json.c index 4b42b6802d05..2880a25d87f9 100644 --- a/src/output-json.c +++ b/src/output-json.c @@ -955,7 +955,7 @@ int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer **buffer) return 0; } -int OutputJsonBuilderBuffer( +void OutputJsonBuilderBuffer( ThreadVars *tv, const Packet *p, Flow *f, JsonBuilder *js, OutputJsonThreadCtx *ctx) { LogFileCtx *file_ctx = ctx->file_ctx; @@ -994,14 +994,12 @@ int OutputJsonBuilderBuffer( SCLogWarning("Formatted JSON EVE record too large, will be dropped: %s", partial); ctx->too_large_warning = true; } - return 0; + return; } } MemBufferWriteRaw((*buffer), jb_ptr(js), (uint32_t)jslen); LogFileWrite(file_ctx, *buffer); - - return 0; } static inline enum LogFileType FileTypeFromConf(const char *typestr) diff --git a/src/output-json.h b/src/output-json.h index 205ed445d4d6..b8c11778ed27 100644 --- a/src/output-json.h +++ b/src/output-json.h @@ -104,7 +104,7 @@ JsonBuilder *CreateEveHeader(const Packet *p, enum OutputJsonLogDirection dir, JsonBuilder *CreateEveHeaderWithTxId(const Packet *p, enum OutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, uint64_t tx_id, OutputJsonCtx *eve_ctx); int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer **buffer); -int OutputJsonBuilderBuffer( +void OutputJsonBuilderBuffer( ThreadVars *tv, const Packet *p, Flow *f, JsonBuilder *js, OutputJsonThreadCtx *ctx); OutputInitResult OutputJsonInitCtx(ConfNode *);