]> git.sesse.net Git - vlc/commitdiff
Fix compiler warning
authorRémi Denis-Courmont <rem@videolan.org>
Sun, 9 Dec 2007 18:56:09 +0000 (18:56 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sun, 9 Dec 2007 18:56:09 +0000 (18:56 +0000)
src/libvlc-common.c

index 1663febba66181010734b2f26da54eea10d48c03..bd08876ddd0c2eaa13daa82b0f990164679d04b9 100644 (file)
@@ -263,11 +263,12 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     /* Get the executable name (similar to the basename command) */
     if( i_argc > 0 )
     {
-        p_libvlc->psz_object_name = p_tmp = ppsz_argv[ 0 ];
-        while( *p_tmp )
+        const char *exe = ppsz_argv[0];
+        p_libvlc->psz_object_name = exe = ppsz_argv[ 0 ];
+        while( *exe )
         {
-            if( *p_tmp == '/' ) p_libvlc->psz_object_name = ++p_tmp;
-            else ++p_tmp;
+            if( *exe++ == '/' )
+                p_libvlc->psz_object_name = exe;
         }
     }
     else