From 6e8539b8198fd653fe9e5e01e4c2f6dcac9390d1 Mon Sep 17 00:00:00 2001 From: Takahiro Yamashita Date: Sat, 18 Nov 2023 17:33:51 +0900 Subject: [PATCH] input_chunk: ensure returning/compairing FLB_BOOL(#8184) Signed-off-by: Takahiro Yamashita --- src/flb_input_chunk.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/flb_input_chunk.c b/src/flb_input_chunk.c index 959e5fd396e..fb468c7ec5e 100644 --- a/src/flb_input_chunk.c +++ b/src/flb_input_chunk.c @@ -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) @@ -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; }