From 3b896750b8ae7428a36079e8ffadc93e28c610cf Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 20 Aug 2018 16:17:33 +0200 Subject: [PATCH] tests: Use ZERO_STRUCT for readfds This fixes a compiler warning on FreeBSD. Signed-off-by: Andreas Schneider --- tests/unittests/torture_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unittests/torture_channel.c b/tests/unittests/torture_channel.c index de5c496a..c165c572 100644 --- a/tests/unittests/torture_channel.c +++ b/tests/unittests/torture_channel.c @@ -12,13 +12,15 @@ static void torture_channel_select(void **state) { - fd_set readfds = {0}; + fd_set readfds; int fd; int rc; int i; (void)state; /* unused */ + ZERO_STRUCT(readfds); + fd = open("/dev/null", 0); assert_true(fd > 2);