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

Alexandre Janniaux ajanni at videolabs.io
Sun May 3 18:38:17 CEST 2020


Hi,

LGTM,

Regards,
--
Alexandre Janniaux
Videolabs

On Sun, May 03, 2020 at 03:39:22PM +0300, RĂ©mi Denis-Courmont wrote:
> 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
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list