tasn pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=16063b8ab1c5ddb65e69ea632d67a01f45211af2

commit 16063b8ab1c5ddb65e69ea632d67a01f45211af2
Author: Vincent Torri <vincent.to...@gmail.com>
Date:   Wed Jul 22 07:31:26 2015 +0200

    Use eina_environment_tmp_get()
---
 src/lib/ecore/ecore.c           | 15 +++------------
 src/lib/ecore_evas/ecore_evas.c | 12 ++++--------
 2 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index f94584d..f121258 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -774,11 +774,7 @@ _ecore_fps_debug_init(void)
    _ecore_fps_debug_init_count++;
    if (_ecore_fps_debug_init_count > 1) return;
 
-#ifndef HAVE_EVIL
-   tmp = "/tmp";
-#else
-   tmp = evil_tmpdir_get ();
-#endif /* HAVE_EVIL */
+   tmp = eina_environment_tmp_get();
    pid = (int)getpid();
    snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i", tmp, pid);
    _ecore_fps_debug_fd = open(buf, O_CREAT | O_TRUNC | O_RDWR, 0644);
@@ -829,16 +825,11 @@ _ecore_fps_debug_shutdown(void)
    if (_ecore_fps_debug_fd >= 0)
      {
         char buf[4096];
-        const char *tmp;
         int pid;
 
-#ifndef HAVE_EVIL
-        tmp = "/tmp";
-#else
-        tmp = (char *)evil_tmpdir_get ();
-#endif /* HAVE_EVIL */
         pid = (int)getpid();
-        snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i", tmp, pid);
+        snprintf(buf, sizeof(buf), "%s/.ecore_fps_debug-%i",
+                 eina_environment_tmp_get(), pid);
         unlink(buf);
         if (_ecore_fps_runtime_mmap)
           {
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 6e49b62..f7fa61f 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2966,17 +2966,12 @@ EAPI void
 _ecore_evas_fps_debug_init(void)
 {
    char buf[4096];
-   const char *tmp;
 
    _ecore_evas_fps_debug_init_count++;
    if (_ecore_evas_fps_debug_init_count > 1) return;
 
-#ifndef HAVE_EVIL
-   tmp = "/tmp";
-#else
-   tmp = evil_tmpdir_get ();
-#endif /* HAVE_EVIL */
-   snprintf(buf, sizeof(buf), "%s/.ecore_evas_fps_debug-%i", tmp, 
(int)getpid());
+   snprintf(buf, sizeof(buf), "%s/.ecore_evas_fps_debug-%i",
+            eina_environment_tmp_get(), (int)getpid());
    _ecore_evas_fps_debug_fd = open(buf, O_CREAT | O_TRUNC | O_RDWR, 0644);
    if (_ecore_evas_fps_debug_fd < 0)
      {
@@ -3026,7 +3021,8 @@ _ecore_evas_fps_debug_shutdown(void)
      {
         char buf[4096];
 
-        snprintf(buf, sizeof(buf), "/tmp/.ecore_evas_fps_debug-%i", 
(int)getpid());
+        snprintf(buf, sizeof(buf), "%s/.ecore_evas_fps_debug-%i",
+                 eina_environment_tmp_get(), (int)getpid());
         unlink(buf);
         if (_ecore_evas_fps_rendertime_mmap)
           {

-- 


Reply via email to