Remove unused system_End() parameter
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 19 Aug 2011 19:37:10 +0000 (22:37 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 19 Aug 2011 20:38:37 +0000 (23:38 +0300)
src/libvlc.c
src/libvlc.h
src/posix/darwin_specific.c
src/posix/linux_specific.c
src/posix/specific.c
src/win32/specific.c

index e40db76..117cc57 100644 (file)
@@ -580,7 +580,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                     {
                         msg_Err( p_libvlc, "D-Bus problem" );
                         free( psz_mrl );
-                        system_End( p_libvlc );
+                        system_End( );
                         exit( 1 );
                     }
 
@@ -591,7 +591,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                     {
                         dbus_message_unref( p_dbus_msg );
                         free( psz_mrl );
-                        system_End( p_libvlc );
+                        system_End( );
                         exit( 1 );
                     }
                     free( psz_mrl );
@@ -600,7 +600,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                                 DBUS_TYPE_OBJECT_PATH, &psz_after_track ) )
                     {
                         dbus_message_unref( p_dbus_msg );
-                        system_End( p_libvlc );
+                        system_End( );
                         exit( 1 );
                     }
 
@@ -612,7 +612,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                                 DBUS_TYPE_BOOLEAN, &b_play ) )
                     {
                         dbus_message_unref( p_dbus_msg );
-                        system_End( p_libvlc );
+                        system_End( );
                         exit( 1 );
                     }
 
@@ -622,7 +622,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                     {
                         msg_Err( p_libvlc, "D-Bus problem" );
                         dbus_message_unref( p_dbus_msg );
-                        system_End( p_libvlc );
+                        system_End( );
                         exit( 1 );
                     }
 
@@ -630,7 +630,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                     {
                         msg_Err( p_libvlc, "D-Bus problem" );
                         dbus_message_unref( p_dbus_msg );
-                        system_End( p_libvlc );
+                        system_End( );
                         exit( 1 );
                     }
                     dbus_connection_flush( p_conn );
@@ -641,7 +641,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
                 } /* processes all command line MRLs */
 
                 /* bye bye */
-                system_End( p_libvlc );
+                system_End( );
                 exit( 0 );
             }
         }
@@ -1037,7 +1037,7 @@ void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
     if( i_instances == 0 )
     {
         /* System specific cleaning code */
-        system_End( p_libvlc );
+        system_End( );
     }
     vlc_mutex_unlock( &global_lock );
 
index ebb97ea..2dbccf8 100644 (file)
@@ -39,7 +39,7 @@ size_t vlc_towc (const char *str, uint32_t *restrict pwc);
  */
 void system_Init      ( void );
 void system_Configure ( libvlc_int_t *, int, const char *const [] );
-void system_End       ( libvlc_int_t * );
+void system_End       ( void );
 
 /*
  * Threads subsystem
index 9dead94..db6f8be 100644 (file)
@@ -166,9 +166,8 @@ void system_Configure( libvlc_int_t *p_this,
 /*****************************************************************************
  * system_End: free the program path.
  *****************************************************************************/
-void system_End( libvlc_int_t *p_this )
+void system_End( void )
 {
-    (void)p_this;
     free( psz_vlcpath );
     psz_vlcpath = NULL;
 }
index 11dd6d6..1d1e966 100644 (file)
@@ -119,12 +119,10 @@ void system_Configure (libvlc_int_t *libvlc,
     (void)libvlc; (void)argc; (void)argv;
 }
 
-void system_End (libvlc_int_t *libvlc)
+void system_End (void)
 {
     vlc_mutex_lock (&once.lock);
     if (--once.refs == 0)
         unset_libvlc_path ();
     vlc_mutex_unlock (&once.lock);
-
-    (void)libvlc;
 }
index cd53a96..2491637 100644 (file)
@@ -44,7 +44,6 @@ void system_Configure (libvlc_int_t *libvlc,
     (void)libvlc; (void)argc; (void)argv;
 }
 
-void system_End (libvlc_int_t *libvlc)
+void system_End (void)
 {
-    (void)libvlc;
 }
index a34fc70..006eb8d 100644 (file)
@@ -260,7 +260,7 @@ void system_Configure( libvlc_int_t *p_this, int i_argc, const char *const ppsz_
             ReleaseMutex( hmutex );
 
             /* Bye bye */
-            system_End( p_this );
+            system_End( );
             exit( 0 );
         }
     }
@@ -371,26 +371,20 @@ LRESULT CALLBACK WMCOPYWNDPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
 /*****************************************************************************
  * system_End: terminate winsock.
  *****************************************************************************/
-void system_End( libvlc_int_t *p_this )
+void system_End( void )
 {
     HWND ipcwindow;
-    if( p_this )
-    {
-        free( psz_vlcpath );
-        psz_vlcpath = NULL;
-    }
 
-    if (p_helper && p_helper->p_parent == VLC_OBJECT(p_this) )
+    free( psz_vlcpath );
+    psz_vlcpath = NULL;
+
+    /* FIXME: thread-safety... */
+    if (p_helper)
     {
-        /* this is the first instance (in a one-instance system)
-         * it is the owner of the helper thread
-         */
         if( ( ipcwindow = FindWindow( 0, L"VLC ipc "VERSION ) ) != 0 )
         {
             SendMessage( ipcwindow, WM_QUIT, 0, 0 );
         }
-
-        /* FIXME: thread-safety... */
         vlc_object_release (p_helper);
         p_helper = NULL;
     }