ecore-wl2: Remove erroneous check for wayland display
authorChris Michael <cpmichael@osg.samsung.com>
Mon, 16 May 2016 10:53:27 +0000 (06:53 -0400)
committerChris Michael <cpmichael@osg.samsung.com>
Mon, 16 May 2016 10:53:27 +0000 (06:53 -0400)
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>
src/lib/ecore_wl2/ecore_wl2_display.c

index 7770d3b..efde7ac 100644 (file)
@@ -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
      {