Both the blocks in this if/else clause do the same thing, so combine
the comparisons into one.

No functional change.

Reviewed-by: Bryce Harrington <br...@osg.samsung.com>
Signed-off-by: Derek Foreman <der...@osg.samsung.com>
---
 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 a77cf71..7243d3d 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.11.0

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to