From f7796faa599a7690f9d47366ba190e2b0e488d80 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 16 May 2016 06:53:27 -0400 Subject: [PATCH] ecore-wl2: Remove erroneous check for wayland display NB: No real major changes, just removal of an extra 'if' block. If getenv of wayland display fails, we hard-code the default wayland display name so subsequent check for 'if (n)' is erroneous Signed-off-by: Chris Michael --- src/lib/ecore_wl2/ecore_wl2_display.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c b/src/lib/ecore_wl2/ecore_wl2_display.c index 7770d3b4da..efde7acbb7 100644 --- a/src/lib/ecore_wl2/ecore_wl2_display.c +++ b/src/lib/ecore_wl2/ecore_wl2_display.c @@ -636,18 +636,13 @@ ecore_wl2_display_connect(const char *name) { /* client wants to connect to default display */ n = getenv("WAYLAND_DISPLAY"); + if (!n) n = "wayland-0"; - if (!n) - n = "wayland-0"; + /* we have a default wayland display */ - if (n) - { - /* we have a default wayland display */ - - /* check hash of cached client displays for this name */ - ewd = eina_hash_find(_client_displays, n); - if (ewd) goto found; - } + /* check hash of cached client displays for this name */ + ewd = eina_hash_find(_client_displays, n); + if (ewd) goto found; } else {