From 1092d8e25a36663ec2a9c02935ab69e589b6459a Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 25 Nov 2021 16:13:46 +1100 Subject: [PATCH] use .s_addr to handle potential union in struct in_addr --- lib/isc/tests/doh_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/isc/tests/doh_test.c b/lib/isc/tests/doh_test.c index cae2548c07..117728554d 100644 --- a/lib/isc/tests/doh_test.c +++ b/lib/isc/tests/doh_test.c @@ -2066,7 +2066,7 @@ doh_path_validation(void **state) { static void doh_connect_makeuri(void **state) { - struct in_addr localhostv4 = { ntohl(INADDR_LOOPBACK) }; + struct in_addr localhostv4 = { .s_addr = ntohl(INADDR_LOOPBACK) }; isc_sockaddr_t sa; char uri[256]; UNUSED(state);