1
0
Fork 0
mirror of https://passt.top/passt synced 2025-05-28 04:17:20 +02:00

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 <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
David Gibson 2023-08-01 13:36:46 +10:00 committed by Stefano Brivio
parent 649068a287
commit 8218d99013
10 changed files with 73 additions and 78 deletions

View file

@ -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;
};