[vlc-commits] config: use var_Inherit*()
    Rémi Denis-Courmont 
    git at videolan.org
       
    Tue May  5 17:52:31 CEST 2020
    
    
  
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May  3 15:38:25 2020 +0300| [0c2b5dabb4b4e02d2046fe2ac83cebc24b226dd0] | committer: Rémi Denis-Courmont
config: use var_Inherit*()
Rather than creating and immediately deleting the variable.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0c2b5dabb4b4e02d2046fe2ac83cebc24b226dd0
---
 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 );
    
    
More information about the vlc-commits
mailing list