raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4b24b386db32e1157fb09d4b51da6f78fd317fd1

commit 4b24b386db32e1157fb09d4b51da6f78fd317fd1
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Mon Jun 16 15:57:05 2014 +0900

    fix duplicate function call names in ecore and ecore_con that can clash
    
    this fixes T1341. also it removes the pointless return value from
    these two functions as the return is never used. also the ifdef in
    ecore_main.c seemed wrong as it wasd using fcntl not execvp but the
    ifdef was for execvp. this just never was discovered, so it's slid
    under the hood for a long time.
---
 src/lib/ecore/ecore_main.c         | 13 ++++---------
 src/lib/ecore/ecore_private.h      |  2 +-
 src/lib/ecore_con/ecore_con_info.c | 17 ++++++-----------
 3 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index eba725e..db04a01 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -273,23 +273,18 @@ static gboolean _ecore_glib_idle_enterer_called;
 static gboolean ecore_fds_ready;
 #endif
 
-Eina_Bool
+void
 _ecore_fd_close_on_exec(int fd)
 {
-#ifdef HAVE_EXECVP
+#ifdef HAVE_FCNTL
    int flags;
 
    flags = fcntl(fd, F_GETFD);
-   if (flags == -1)
-     return EINA_FALSE;
-
+   if (flags == -1) return;
    flags |= FD_CLOEXEC;
-   if (fcntl(fd, F_SETFD, flags) == -1)
-     return EINA_FALSE;
-   return EINA_TRUE;
+   if (fcntl(fd, F_SETFD, flags) == -1)  return;
 #else
    (void) fd;
-   return EINA_FALSE;
 #endif
 }
 
diff --git a/src/lib/ecore/ecore_private.h b/src/lib/ecore/ecore_private.h
index 4912d53..9149758 100644
--- a/src/lib/ecore/ecore_private.h
+++ b/src/lib/ecore/ecore_private.h
@@ -186,7 +186,7 @@ Ecore_Fd_Handler *
                                       const void *buf_data);
 void      *_ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
 
-Eina_Bool _ecore_fd_close_on_exec(int fd);
+void       _ecore_fd_close_on_exec(int fd);
 
 void       _ecore_main_shutdown(void);
 
diff --git a/src/lib/ecore_con/ecore_con_info.c 
b/src/lib/ecore_con/ecore_con_info.c
index 76fd6c7..c89ad24 100644
--- a/src/lib/ecore_con/ecore_con_info.c
+++ b/src/lib/ecore_con/ecore_con_info.c
@@ -178,23 +178,18 @@ ecore_con_info_mcast_listen(Ecore_Con_Server *svr,
    return ecore_con_info_get(svr, done_cb, data, &hints);
 }
 
-Eina_Bool
-_ecore_fd_close_on_exec(int fd)
+static void
+_ecore_con_fd_close_on_exec(int fd)
 {
 #ifdef HAVE_FCNTL
    int flags;
 
    flags = fcntl(fd, F_GETFD);
-   if (flags == -1)
-     return EINA_FALSE;
-
+   if (flags == -1) return;
    flags |= FD_CLOEXEC;
-   if (fcntl(fd, F_SETFD, flags) == -1)
-     return EINA_FALSE;
-   return EINA_TRUE;
+   if (fcntl(fd, F_SETFD, flags) == -1) return;
 #else
    (void)fd;
-   return EINA_FALSE;
 #endif
 }
 
@@ -213,8 +208,8 @@ ecore_con_info_get(Ecore_Con_Server *svr,
         return 0;
      }
 
-   _ecore_fd_close_on_exec(fd[0]);
-   _ecore_fd_close_on_exec(fd[1]);
+   _ecore_con_fd_close_on_exec(fd[0]);
+   _ecore_con_fd_close_on_exec(fd[1]);
 
    cbdata = calloc(1, sizeof(CB_Data));
    if (!cbdata)

-- 


Reply via email to