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

RĂ©mi Denis-Courmont remi at remlab.net
Thu Apr 23 21:04:53 CEST 2020


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



More information about the vlc-devel mailing list