From 8218d990138b7da8411351488ea06243134ae37b Mon Sep 17 00:00:00 2001 From: David Gibson Date: Tue, 1 Aug 2023 13:36:46 +1000 Subject: Use C11 anonymous members to make poll refs less verbose to use union epoll_ref has a deeply nested set of structs and unions to let us subdivide it into the various different fields we want. This means that referencing elements can involve an awkward long string of intermediate fields. Using C11 anonymous structs and unions lets us do this less clumsily. Signed-off-by: David Gibson Signed-off-by: Stefano Brivio --- passt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'passt.h') diff --git a/passt.h b/passt.h index 96fd27b..8b7235a 100644 --- a/passt.h +++ b/passt.h @@ -60,8 +60,8 @@ union epoll_ref { union udp_epoll_ref udp; union icmp_epoll_ref icmp; uint32_t data; - } p; - } r; + }; + }; uint64_t u64; }; -- cgit v1.2.3