[vlc-devel] [PATCH] config: use var_Inherit*()

RĂ©mi Denis-Courmont remi at remlab.net
Sun May 3 14:39:22 CEST 2020


Rather than creating and immediately deleting the variable.
---
 src/config/file.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/config/file.c b/src/config/file.c
index e6b10e5c02..c7e2e5c718 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -57,8 +57,7 @@ static inline char *strdupnull (const char *src)
  */
 static char *config_GetConfigFile( vlc_object_t *obj )
 {
-    char *psz_file = var_CreateGetNonEmptyString( obj, "config" );
-    var_Destroy( obj, "config" );
+    char *psz_file = var_InheritString( obj, "config" );
     if( psz_file == NULL )
     {
         char *psz_dir = config_GetUserDir( VLC_CONFIG_DIR );
-- 
2.26.2



More information about the vlc-devel mailing list