Skip to content

Commit

Permalink
output-json: cleanup, have OutputJsonBuilderBuffer return void
Browse files Browse the repository at this point in the history
The return value was never used.
  • Loading branch information
jasonish committed Nov 28, 2024
1 parent a392204 commit 45e972e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/output-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/output-json.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down

0 comments on commit 45e972e

Please sign in to comment.