From 0f80ab1d71318b2aa653d4186b2e079d2ab60e00 Mon Sep 17 00:00:00 2001 From: Christophe Bedard Date: Fri, 26 Jan 2024 00:42:55 -0800 Subject: [PATCH] Zero-initialize rcutils_string_array_t in test_string_array (#446) Signed-off-by: Christophe Bedard --- test/test_string_array.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_string_array.cpp b/test/test_string_array.cpp index ccd813d8..494612cd 100644 --- a/test/test_string_array.cpp +++ b/test/test_string_array.cpp @@ -167,7 +167,7 @@ TEST(test_string_array, string_array_resize) { rcutils_reset_error(); // Start with 8 elements - rcutils_string_array_t sa0; + rcutils_string_array_t sa0 = rcutils_get_zero_initialized_string_array(); ret = rcutils_string_array_init(&sa0, 8, &allocator); ASSERT_EQ(RCUTILS_RET_OK, ret);