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 1663feb..bd08876 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