From 5ef6296410d0f1322017b939e29365310f50ce7e Mon Sep 17 00:00:00 2001 From: Patrick Stephens Date: Mon, 16 Dec 2024 11:33:47 +0000 Subject: [PATCH] in_calyptia_fleet: fix up review comments Signed-off-by: Patrick Stephens --- plugins/in_calyptia_fleet/in_calyptia_fleet.c | 2 +- plugins/in_calyptia_fleet/in_calyptia_fleet.h | 6 +++--- tests/runtime/custom_calyptia_input_test.c | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/in_calyptia_fleet/in_calyptia_fleet.c b/plugins/in_calyptia_fleet/in_calyptia_fleet.c index a1d9bdad642..3d4de1fe9ae 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.c +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.c @@ -1655,7 +1655,7 @@ flb_sds_t fleet_config_get(struct flb_in_calyptia_fleet_config *ctx) flb_ctx_t *flb = flb_context_get(); flb_sds_t fleet_id = NULL; - if( !ctx ) { + if (!ctx) { return NULL; } diff --git a/plugins/in_calyptia_fleet/in_calyptia_fleet.h b/plugins/in_calyptia_fleet/in_calyptia_fleet.h index 42a55a51516..315228edb7d 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.h +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.h @@ -17,8 +17,8 @@ * limitations under the License. */ -#ifndef FLB_IN_CALYPTIA_FLEET -#define FLB_IN_CALYPTIA_FLEET +#ifndef FLB_IN_CALYPTIA_FLEET_H +#define FLB_IN_CALYPTIA_FLEET_H #include #include @@ -81,4 +81,4 @@ static int get_calyptia_files(struct flb_in_calyptia_fleet_config *ctx, static int fleet_cur_chdir(struct flb_in_calyptia_fleet_config *ctx); -#endif /* FLB_IN_CALYPTIA_FLEET */ +#endif /* FLB_IN_CALYPTIA_FLEET_H */ diff --git a/tests/runtime/custom_calyptia_input_test.c b/tests/runtime/custom_calyptia_input_test.c index 4923e2904ac..387d241cd16 100644 --- a/tests/runtime/custom_calyptia_input_test.c +++ b/tests/runtime/custom_calyptia_input_test.c @@ -307,6 +307,7 @@ static void test_calyptia_config_format() { TEST_MSG("fleet_config_legacy_format changed expected=%s got=%s", expectedValue, value); TEST_CHECK(value && strcasecmp(value, expectedValue) == 0); + flb_free(expectedValue); cleanup_test_context(t_ctx); }