summaryrefslogtreecommitdiff
path: root/src/lib/eina
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-05-14 18:38:36 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-05-14 18:41:48 +0200
commit0ed04f768170f49b2f96140ef7cc3983b8f4adb9 (patch)
tree40d6808b7676b7e8858286a207487fa075c1ecc0 /src/lib/eina
parent9c571f01f7af8db1df238daa3136bf639247ac55 (diff)
eina: fixup.
Diffstat (limited to 'src/lib/eina')
-rw-r--r--src/lib/eina/eina_util.c12
-rw-r--r--src/lib/eina/eina_util.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/eina/eina_util.c b/src/lib/eina/eina_util.c
index 55b5bd5343..68c0fcc666 100644
--- a/src/lib/eina/eina_util.c
+++ b/src/lib/eina/eina_util.c
@@ -40,7 +40,7 @@
40 * API * 40 * API *
41 *============================================================================*/ 41 *============================================================================*/
42 42
43EAPI Eina_Tmpstr * 43EAPI const char *
44eina_environment_home_get(void) 44eina_environment_home_get(void)
45{ 45{
46#ifdef _WIN32 46#ifdef _WIN32
@@ -50,13 +50,13 @@ eina_environment_home_get(void)
50 if (!home) home = getenv("WINDIR"); 50 if (!home) home = getenv("WINDIR");
51 if (!home) home = "C:\\"; 51 if (!home) home = "C:\\";
52 52
53 return eina_tmpstr_add(home); 53 return home;
54#else 54#else
55 return eina_tmpstr_add(getenv("HOME")); 55 return getenv("HOME");
56#endif 56#endif
57} 57}
58 58
59EAPI Eina_Tmpstr * 59EAPI const char *
60eina_environment_tmp_get(void) 60eina_environment_tmp_get(void)
61{ 61{
62 char *tmp; 62 char *tmp;
@@ -68,12 +68,12 @@ eina_environment_tmp_get(void)
68 if (!tmp) tmp = getenv("WINDIR"); 68 if (!tmp) tmp = getenv("WINDIR");
69 if (!tmp) tmp = "C:\\"; 69 if (!tmp) tmp = "C:\\";
70 70
71 return eina_tmpstr_add(tmp); 71 return tmp;
72#else 72#else
73 tmp = getenv("TMPDIR"); 73 tmp = getenv("TMPDIR");
74 if (!tmp) tmp = getenv("XDG_RUNTIME_DIR"); 74 if (!tmp) tmp = getenv("XDG_RUNTIME_DIR");
75 if (!tmp) tmp = "/tmp"; 75 if (!tmp) tmp = "/tmp";
76 76
77 return eina_tmpstr_add(tmp); 77 return tmp;
78#endif 78#endif
79} 79}
diff --git a/src/lib/eina/eina_util.h b/src/lib/eina/eina_util.h
index 3677cc4a1a..a73c4db75c 100644
--- a/src/lib/eina/eina_util.h
+++ b/src/lib/eina/eina_util.h
@@ -32,7 +32,7 @@
32 * @note The result of this call is highly system dependent and you better use 32 * @note The result of this call is highly system dependent and you better use
33 * it instead of the naive getenv("HOME"). 33 * it instead of the naive getenv("HOME").
34 */ 34 */
35EAPI Eina_Tmpstr *eina_environment_home_get(void); 35EAPI const char *eina_environment_home_get(void);
36 36
37/** 37/**
38 * @brief Return the content of the environment refered as TMPDIR on this system. 38 * @brief Return the content of the environment refered as TMPDIR on this system.
@@ -41,6 +41,6 @@ EAPI Eina_Tmpstr *eina_environment_home_get(void);
41 * @note The result of this call is highly system dependent and you better use 41 * @note The result of this call is highly system dependent and you better use
42 * it instead of the naive getenv("TMPDIR"). 42 * it instead of the naive getenv("TMPDIR").
43 */ 43 */
44EAPI Eina_Tmpstr *eina_environment_tmp_get(void); 44EAPI const char *eina_environment_tmp_get(void);
45 45
46#endif 46#endif