From 56696e514842d214be492c3291e7572f2d70d976 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 13 Apr 2017 11:51:47 -0500 Subject: [PATCH] client: Simplify some logic in queue_event Both the blocks in this if/else clause do the same thing, so combine the comparisons into one. No functional change. Signed-off-by: Derek Foreman Reviewed-by: Bryce Harrington Reviewed-by: Daniel Stone --- src/wayland-client.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wayland-client.c b/src/wayland-client.c index 3d7361e..8fb2dbd 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -1228,10 +1228,7 @@ queue_event(struct wl_display *display, int len) return 0; proxy = wl_map_lookup(&display->objects, id); - if (proxy == WL_ZOMBIE_OBJECT) { - wl_connection_consume(display->connection, size); - return size; - } else if (proxy == NULL) { + if (!proxy || proxy == WL_ZOMBIE_OBJECT) { wl_connection_consume(display->connection, size); return size; } -- 2.7.4