[vlc-commits] lib/media_discovery: narrower scope of iteration variable

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:00 2016 +0200| [2c557116ca3e233a6d53a777b220c8c9ae7f8dc3] | committer: Jean-Baptiste Kempf

lib/media_discovery: narrower scope of iteration variable

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

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

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

diff --git a/lib/media_discoverer.c b/lib/media_discoverer.c
index 75a91d7..29dcda0 100644
--- a/lib/media_discoverer.c
+++ b/lib/media_discoverer.c
@@ -277,8 +277,6 @@ libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
 void
 libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis )
 {
-    int i;
-
     vlc_event_detach( services_discovery_EventManager( p_mdis->p_sd ),
                      vlc_ServicesDiscoveryItemAdded,
                      services_discovery_item_added,
@@ -301,7 +299,7 @@ libvlc_media_discoverer_release( libvlc_media_discoverer_t * p_mdis )
 
     /* Free catname_to_submedialist and all the mlist */
     char ** all_keys = vlc_dictionary_all_keys( &p_mdis->catname_to_submedialist );
-    for( i = 0; all_keys[i]; i++ )
+    for( int i = 0; all_keys[i]; i++ )
     {
         libvlc_media_list_t * p_catmlist = vlc_dictionary_value_for_key( &p_mdis->catname_to_submedialist, all_keys[i] );
         libvlc_media_list_release( p_catmlist );



More information about the vlc-commits mailing list