summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/wayland_shm/evas_shm.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-09 22:06:16 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-09 22:06:16 +0900
commit2037474dc0fd2b360452f2a15abcbe533b57ca37 (patch)
tree7e5da455c6dadabd9c2c023bd3b2d12abe321f67 /src/modules/evas/engines/wayland_shm/evas_shm.c
parent810b17e7a4338d9fe8b6a3bebf92761880600eff (diff)
vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are technically not needed. also remove any other tmp strings and use the vpath string resolving feature to avoid printfs/strjoins/cats etc. etc. as well.
Diffstat (limited to 'src/modules/evas/engines/wayland_shm/evas_shm.c')
-rw-r--r--src/modules/evas/engines/wayland_shm/evas_shm.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c
index 05c7ec3945..3b9e7a525c 100644
--- a/src/modules/evas/engines/wayland_shm/evas_shm.c
+++ b/src/modules/evas/engines/wayland_shm/evas_shm.c
@@ -82,8 +82,6 @@ static struct wl_shm_pool *
82_shm_pool_make(struct wl_shm *shm, int size, void **data) 82_shm_pool_make(struct wl_shm *shm, int size, void **data)
83{ 83{
84 struct wl_shm_pool *pool; 84 struct wl_shm_pool *pool;
85 static const char tmp[] = "evas-wayland_shm-XXXXXX";
86 const char *path;
87 char *name; 85 char *name;
88 int fd = 0; 86 int fd = 0;
89 Eina_Tmpstr *fullname; 87 Eina_Tmpstr *fullname;
@@ -95,15 +93,11 @@ _shm_pool_make(struct wl_shm *shm, int size, void **data)
95 if (!shm) return NULL; 93 if (!shm) return NULL;
96 94
97 /* create tmp file name */ 95 /* create tmp file name */
98 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/"); 96 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS,
99 efl_vpath_file_do(file_obj); 97 "(:run:)/evas-wayland_shm-XXXXXX");
100 efl_vpath_file_wait(file_obj); 98 fd = eina_file_mkstemp(efl_vpath_file_result_get(file_obj), &fullname);
101 path = efl_vpath_file_result_get(file_obj); 99 efl_del(file_obj);
102 if ((name = malloc(strlen(path) + sizeof(tmp)))) strcpy(name, path); 100
103 if (!name) return NULL;
104 strcat(name, tmp);
105
106 fd = eina_file_mkstemp(name, &fullname);
107 if (fd < 0) 101 if (fd < 0)
108 /* try to create tmp file */ 102 /* try to create tmp file */
109 /* if ((fd = mkstemp(name)) < 0) */ 103 /* if ((fd = mkstemp(name)) < 0) */