Use wl_container_of internally

Rather than have two versions of the macro with slightly different
interfaces, just use wl_container_of internally.

This also removes use of statement expressions, a GNU C extension.

Signed-off-by: Michael Forney <mforney@mforney.org>
This commit is contained in:
Michael Forney 2019-06-01 15:11:48 -07:00 committed by Simon Ser
parent 2485a5c274
commit 55d044810c
7 changed files with 11 additions and 14 deletions

View file

@ -595,8 +595,8 @@ wl_event_loop_dispatch_idle(struct wl_event_loop *loop)
struct wl_event_source_idle *source;
while (!wl_list_empty(&loop->idle_list)) {
source = container_of(loop->idle_list.next,
struct wl_event_source_idle, base.link);
source = wl_container_of(loop->idle_list.next,
source, base.link);
source->func(source->base.data);
wl_event_source_remove(&source->base);
}