[vlc-commits] lib/media_list: narrow scope of variable used in loop

Filip Roséen git at videolan.org
Thu Oct 13 11:09:46 CEST 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Wed Oct 12 20:08:04 2016 +0200| [66f979100722e0df7aa8347dacf3644cac1fff1f] | committer: Jean-Baptiste Kempf

lib/media_list: narrow scope of variable used in loop

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 lib/media_list.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lib/media_list.c b/lib/media_list.c
index e81d657..2c5680a 100644
--- a/lib/media_list.c
+++ b/lib/media_list.c
@@ -189,8 +189,6 @@ libvlc_media_list_new( libvlc_instance_t * p_inst )
  **************************************************************************/
 void libvlc_media_list_release( libvlc_media_list_t * p_mlist )
 {
-    libvlc_media_t * p_md;
-
     vlc_mutex_lock( &p_mlist->refcount_lock );
     p_mlist->i_refcount--;
     if( p_mlist->i_refcount > 0 )
@@ -208,7 +206,7 @@ void libvlc_media_list_release( libvlc_media_list_t * p_mlist )
 
     for ( int i = 0; i < vlc_array_count( &p_mlist->items ); i++ )
     {
-        p_md = vlc_array_item_at_index( &p_mlist->items, i );
+        libvlc_media_t* p_md = vlc_array_item_at_index( &p_mlist->items, i );
         libvlc_media_release( p_md );
     }
 



More information about the vlc-commits mailing list