discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=bd313e90dd5ed2a320e022661b4e773baca298b8

commit bd313e90dd5ed2a320e022661b4e773baca298b8
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Apr 28 16:58:55 2015 -0400

    fix xwayland fd dup conditionals
---
 src/modules/xwayland/e_mod_main.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/modules/xwayland/e_mod_main.c 
b/src/modules/xwayland/e_mod_main.c
index 92bad9a..2013607 100644
--- a/src/modules/xwayland/e_mod_main.c
+++ b/src/modules/xwayland/e_mod_main.c
@@ -192,17 +192,21 @@ _cb_xserver_event(void *data EINA_UNUSED, 
Ecore_Fd_Handler *hdlr EINA_UNUSED)
      {
       case 0:
         /* dup will unset CLOEXEC on the client as cloexec closes both ends */
-        if ((fd = dup(socks[1]) < 0)) goto fail;
+        fd = dup(socks[1]);
+        if (fd < 0) goto fail;
         snprintf(s, sizeof(s), "%d", fd);
         setenv("WAYLAND_SOCKET", s, 1);
 
-        if ((fd = dup(exs->abs_fd)) < 0) goto fail;
+        fd = dup(exs->abs_fd);
+        if (fd < 0) goto fail;
         snprintf(abs_fd, sizeof(abs_fd), "%d", fd);
 
-        if ((fd = dup(exs->unx_fd)) < 0) goto fail;
+        fd = dup(exs->unx_fd);
+        if (fd < 0) goto fail;
         snprintf(unx_fd, sizeof(unx_fd), "%d", fd);
 
-        if ((fd = dup(wms[1])) < 0) goto fail;
+        fd = dup(wms[1]);
+        if (fd < 0) goto fail;
         snprintf(wm_fd, sizeof(wm_fd), "%d", fd);
 
         /* ignore usr1 and have X send it to the parent process */

-- 


Reply via email to