libaacs | branch: master | npzacs <npz...@gmail.com> | Thu May  7 10:45:34 2015 
+0300| [7957233a21118ab70d9ba3be51dad7381e4868a7] | committer: npzacs

Use str_dup()

> http://git.videolan.org/gitweb.cgi/libaacs.git/?a=commit;h=7957233a21118ab70d9ba3be51dad7381e4868a7
---

 src/file/dirs_xdg.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/file/dirs_xdg.c b/src/file/dirs_xdg.c
index c3cea33..0cca357 100644
--- a/src/file/dirs_xdg.c
+++ b/src/file/dirs_xdg.c
@@ -44,7 +44,7 @@ char *file_get_config_home(void)
 {
     const char *xdg_home = getenv("XDG_CONFIG_HOME");
     if (xdg_home && *xdg_home) {
-        return str_printf("%s", xdg_home);
+        return str_dup(xdg_home);
     }
 
     const char *user_home = getenv("HOME");
@@ -60,7 +60,7 @@ char *file_get_data_home(void)
 {
     const char *xdg_home = getenv("XDG_DATA_HOME");
     if (xdg_home && *xdg_home) {
-        return str_printf("%s", xdg_home);
+        return str_dup(xdg_home);
     }
 
     const char *user_home = getenv("HOME");
@@ -76,7 +76,7 @@ char *file_get_cache_home(void)
 {
     const char *xdg_cache = getenv("XDG_CACHE_HOME");
     if (xdg_cache && *xdg_cache) {
-        return str_printf("%s", xdg_cache);
+        return str_dup(xdg_cache);
     }
 
     const char *user_home = getenv("HOME");

_______________________________________________
libaacs-devel mailing list
libaacs-devel@videolan.org
https://mailman.videolan.org/listinfo/libaacs-devel

Reply via email to