From 8ed9aec49be611cb3eb255604d3869e3c6c60fbe Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Wed, 8 Mar 2017 14:13:01 -0600 Subject: [PATCH] ecore-wl2: Clarify post-condition for global lookup in _ecore_wl2_shell_bind Summary: The !global test is a post-condition that _ecore_wl2_global_find provided valid data, so the code is clearer if this is kept separate from the subsequent if chain for looking up the shell. Since this post-condition returns from the function on error, it can stand alone. Signed-off-by: Bryce Harrington Reviewers: devilhorns, ManMower Reviewed By: ManMower Subscribers: jpeg, cedric Differential Revision: https://phab.enlightenment.org/D4690 --- src/lib/ecore_wl2/ecore_wl2_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index f054e46..2905bc0 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -449,7 +449,7 @@ _ecore_wl2_shell_bind(Ecore_Wl2_Display *ewd) if (!global) return; - else if (!strcmp(global->interface, "wl_shell")) + if (!strcmp(global->interface, "wl_shell")) { ewd->wl.wl_shell = wl_registry_bind(ewd->wl.registry, global->id, -- 2.7.4