[vlc-commits] podcast: fix variable shadowing

Rémi Denis-Courmont git at videolan.org
Sat Mar 2 20:30:03 CET 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar  2 21:24:05 2019 +0200| [804dda2dbd7393788f1595aba9978b3d2794904e] | committer: Rémi Denis-Courmont

podcast: fix variable shadowing

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

 modules/services_discovery/podcast.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/modules/services_discovery/podcast.c b/modules/services_discovery/podcast.c
index d3666612f1..c05333cf52 100644
--- a/modules/services_discovery/podcast.c
+++ b/modules/services_discovery/podcast.c
@@ -316,10 +316,10 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
     char **ppsz_new_urls = NULL;
     p_sys->b_savedurls_loaded = true;
 
-    int i, j;
-
     for( ;; )
     {
+        int i;
+
         if( !psz_urls )
             break;
 
@@ -356,8 +356,10 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
     }
 
     /* delete removed items and signal the removal */
-    for( i = 0; i<p_sys->i_items; ++i )
+    for( int i = 0; i<p_sys->i_items; ++i )
     {
+        int j;
+
         for( j = 0; j < i_new_items; ++j )
             if( pp_new_items[j] == p_sys->pp_items[i] ) break;
         if( j == i_new_items )



More information about the vlc-commits mailing list