[libbluray-devel] use str_dup()

hpi1 git at videolan.org
Thu May 7 11:56:18 CEST 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu May  7 12:55:34 2015 +0300| [dd5e63271597a4890f415667792f7b104886ae4f] | committer: hpi1

use str_dup()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=dd5e63271597a4890f415667792f7b104886ae4f
---

 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");



More information about the libbluray-devel mailing list