vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Fri Aug 19 22:37:10 2011 +0300| [9b05547a9a0f59996429b09e9385d581de7c3ad0] | committer: Rémi Denis-Courmont
Remove unused system_End() parameter > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9b05547a9a0f59996429b09e9385d581de7c3ad0 --- src/libvlc.c | 16 ++++++++-------- src/libvlc.h | 2 +- src/posix/darwin_specific.c | 3 +-- src/posix/linux_specific.c | 4 +--- src/posix/specific.c | 3 +-- src/win32/specific.c | 20 +++++++------------- 6 files changed, 19 insertions(+), 29 deletions(-) diff --git a/src/libvlc.c b/src/libvlc.c index e40db76..117cc57 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -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 ); diff --git a/src/libvlc.h b/src/libvlc.h index ebb97ea..2dbccf8 100644 --- a/src/libvlc.h +++ b/src/libvlc.h @@ -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 diff --git a/src/posix/darwin_specific.c b/src/posix/darwin_specific.c index 9dead94..db6f8be 100644 --- a/src/posix/darwin_specific.c +++ b/src/posix/darwin_specific.c @@ -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; } diff --git a/src/posix/linux_specific.c b/src/posix/linux_specific.c index 11dd6d6..1d1e966 100644 --- a/src/posix/linux_specific.c +++ b/src/posix/linux_specific.c @@ -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; } diff --git a/src/posix/specific.c b/src/posix/specific.c index cd53a96..2491637 100644 --- a/src/posix/specific.c +++ b/src/posix/specific.c @@ -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; } diff --git a/src/win32/specific.c b/src/win32/specific.c index a34fc70..006eb8d 100644 --- a/src/win32/specific.c +++ b/src/win32/specific.c @@ -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; } _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
