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

@ -1899,7 +1899,9 @@ wl_client_get_link(struct wl_client *client)
WL_EXPORT struct wl_client *
wl_client_from_link(struct wl_list *link)
{
return container_of(link, struct wl_client, link);
struct wl_client *client;
return wl_container_of(link, client, link);
}
/** Add a listener for the client's resource creation signal