[vlc-commits] core: intf: simplify intf_DestroyAll()

Rémi Denis-Courmont git at videolan.org
Sun Mar 24 17:53:13 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Mar 24 18:48:55 2013 +0200| [33cc9972c107e081bca804f4831d0ae31aa8ac5f] | committer: Rémi Denis-Courmont

core: intf: simplify intf_DestroyAll()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=33cc9972c107e081bca804f4831d0ae31aa8ac5f
---

 src/interface/interface.c |   11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/interface/interface.c b/src/interface/interface.c
index 27b7c27..a6a9938 100644
--- a/src/interface/interface.c
+++ b/src/interface/interface.c
@@ -145,28 +145,23 @@ error:
  */
 void intf_DestroyAll( libvlc_int_t *p_libvlc )
 {
-    intf_thread_t *p_first;
+    intf_thread_t *p_intf;
 
     vlc_mutex_lock( &lock );
-    p_first = libvlc_priv( p_libvlc )->p_intf;
+    p_intf = libvlc_priv( p_libvlc )->p_intf;
 #ifndef NDEBUG
     libvlc_priv( p_libvlc )->p_intf = NULL;
 #endif
     vlc_mutex_unlock( &lock );
 
-    /* Tell the interfaces to die */
-    for( intf_thread_t *p_intf = p_first; p_intf; p_intf = p_intf->p_next )
-        vlc_object_kill( p_intf );
-
     /* Cleanup the interfaces */
-    for( intf_thread_t *p_intf = p_first; p_intf != NULL; )
+    while( p_intf != NULL )
     {
         intf_thread_t *p_next = p_intf->p_next;
 
         module_unneed( p_intf, p_intf->p_module );
         config_ChainDestroy( p_intf->p_cfg );
         vlc_object_release( p_intf );
-
         p_intf = p_next;
     }
 }



More information about the vlc-commits mailing list