diff options
| author | Michael Forney <mforney@mforney.org> | 2019-06-01 15:11:48 -0700 |
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2019-06-05 09:58:14 +0000 |
| commit | 55d044810ca32ae24499d2c6aee6084d7e31d576 (patch) | |
| tree | 8a8ca16c2a45078ba8c0c2635b0a86547cd7889f /src/wayland-client.c | |
| parent | Add a missing -pthread to fix compile with slibtool. (diff) | |
| download | wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.gz wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.bz2 wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.lz wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.xz wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.tar.zst wayland-55d044810ca32ae24499d2c6aee6084d7e31d576.zip | |
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>
Diffstat (limited to 'src/wayland-client.c')
| -rw-r--r-- | src/wayland-client.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c index b0805f1..38756f1 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -298,8 +298,8 @@ wl_event_queue_release(struct wl_event_queue *queue) struct wl_closure *closure; while (!wl_list_empty(&queue->event_list)) { - closure = container_of(queue->event_list.next, - struct wl_closure, link); + closure = wl_container_of(queue->event_list.next, + closure, link); wl_list_remove(&closure->link); destroy_queued_closure(closure); } @@ -1400,8 +1400,7 @@ dispatch_event(struct wl_display *display, struct wl_event_queue *queue) int opcode; bool proxy_destroyed; - closure = container_of(queue->event_list.next, - struct wl_closure, link); + closure = wl_container_of(queue->event_list.next, closure, link); wl_list_remove(&closure->link); opcode = closure->opcode; |
