[PATCH 1/3] shell:slight coding style refine
juan.j.zhao at linux.intel.com
juan.j.zhao at linux.intel.com
Tue Jul 17 22:25:13 PDT 2012
From: Juan Zhao <juan.j.zhao at linux.intel.com>
combine several "if" conditions
Signed-off-by: Juan Zhao <juan.j.zhao at linux.intel.com>
---
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
More information about the wayland-devel
mailing list