Skip to content

Commit

Permalink
input_chunk: ensure returning/compairing FLB_BOOL(#8184)
Browse files Browse the repository at this point in the history
Signed-off-by: Takahiro Yamashita <[email protected]>
  • Loading branch information
nokute78 committed Nov 18, 2023
1 parent 9b9c800 commit 6e8539b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/flb_input_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1289,7 +1289,14 @@ int flb_input_chunk_set_up_down(struct flb_input_chunk *ic)

int flb_input_chunk_is_up(struct flb_input_chunk *ic)
{
return cio_chunk_is_up(ic->chunk);
int ret = FLB_FALSE;

ret = cio_chunk_is_up(ic->chunk);
if (ret == CIO_TRUE) {
ret = FLB_TRUE;
}

return ret;
}

int flb_input_chunk_down(struct flb_input_chunk *ic)
Expand Down Expand Up @@ -1501,7 +1508,7 @@ static int input_chunk_append_raw(struct flb_input_instance *in,

/* Update 'input' metrics */
#ifdef FLB_HAVE_METRICS
if (ret == CIO_OK) {
if (ret == FLB_TRUE) {
ic->added_records = n_records;
ic->total_records += n_records;
}
Expand Down

0 comments on commit 6e8539b

Please sign in to comment.