[vlc-devel] [PATCH 1/2] libvlc: remove useless concatenation

Thomas Guillem thomas at gllm.fr
Fri Apr 24 09:42:21 CEST 2020


Hello,

LGTM for the set.

On Thu, Apr 23, 2020, at 21:04, RĂ©mi Denis-Courmont wrote:
> Interface modules are probed in strict mode. There are no needs to
> append ",none" at the end here.
> ---
>  src/libvlc.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/src/libvlc.c b/src/libvlc.c
> index c23cf8b870..aa42993037 100644
> --- a/src/libvlc.c
> +++ b/src/libvlc.c
> @@ -283,7 +283,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, 
> int i_argc,
>      psz_parser = psz_modules;
>      while ( psz_parser && *psz_parser )
>      {
> -        char *psz_module, *psz_temp;
> +        char *psz_module;
>          psz_module = psz_parser;
>          psz_parser = strchr( psz_module, ':' );
>          if ( psz_parser )
> @@ -291,11 +291,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, 
> int i_argc,
>              *psz_parser = '\0';
>              psz_parser++;
>          }
> -        if( asprintf( &psz_temp, "%s,none", psz_module ) != -1)
> -        {
> -            libvlc_InternalAddIntf( p_libvlc, psz_temp );
> -            free( psz_temp );
> -        }
> +        libvlc_InternalAddIntf( p_libvlc, psz_module );
>      }
>      free( psz_modules );
>      free( psz_control );
> -- 
> 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