Skip to content

Commit 0f80ab1

Browse files
Zero-initialize rcutils_string_array_t in test_string_array (ros2#446)
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
1 parent fb465d7 commit 0f80ab1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/test_string_array.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ TEST(test_string_array, string_array_resize) {
167167
rcutils_reset_error();
168168

169169
// Start with 8 elements
170-
rcutils_string_array_t sa0;
170+
rcutils_string_array_t sa0 = rcutils_get_zero_initialized_string_array();
171171
ret = rcutils_string_array_init(&sa0, 8, &allocator);
172172
ASSERT_EQ(RCUTILS_RET_OK, ret);
173173

0 commit comments

Comments
 (0)