summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-05-16 06:53:27 -0400
committerChris Michael <cpmichael@osg.samsung.com>2016-05-16 06:53:27 -0400
commitf7796faa599a7690f9d47366ba190e2b0e488d80 (patch)
treef15c9a96721809b2b259638acdfd050c22759ebc
parentca55a920d9a5f6a4274e40fcf901a89e622c3007 (diff)
downloadefl-f7796faa599a7690f9d47366ba190e2b0e488d80.tar.gz
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 <cpmichael@osg.samsung.com>
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_display.c15
1 files 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";
-
- if (n)
- {
- /* we have a default wayland display */
+ /* 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
{