From: Juan Zhao <[email protected]>

combine several "if" conditions

Signed-off-by: Juan Zhao <[email protected]>
---
 src/shell.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/shell.c b/src/shell.c
index 40cef14..613304f 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -913,12 +913,9 @@ ping_handler(struct weston_surface *surface, uint32_t 
serial)
        struct wl_event_loop *loop;
        int ping_timeout = 200;
 
-       if (!shsurf)
-               return;
-       if (!shsurf->resource.client)
-               return;
-
-       if (shsurf->surface == shsurf->shell->grab_surface)
+       if (!shsurf ||
+           !shsurf->resource.client ||
+           (shsurf->surface == shsurf->shell->grab_surface))
                return;
 
        if (!shsurf->ping_timer) {
-- 
1.7.11

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to