[vlc-commits] podcast: remove duplicate/dead code

Rémi Denis-Courmont git at videolan.org
Sun Apr 12 09:15:54 CEST 2020


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Apr 12 09:45:33 2020 +0300| [26389305d90056fc5dda91db726ee9b6e8aae7d6] | committer: Rémi Denis-Courmont

podcast: remove duplicate/dead code

The configured URLs are parsed normally already at start.
There were no needs to add a second check, except for the tiny race
condition that was removed by the previous changeset.

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

 modules/services_discovery/podcast.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/modules/services_discovery/podcast.c b/modules/services_discovery/podcast.c
index 17b840463d..189657ef4b 100644
--- a/modules/services_discovery/podcast.c
+++ b/modules/services_discovery/podcast.c
@@ -94,7 +94,6 @@ typedef struct
     vlc_mutex_t lock;
     vlc_cond_t  wait;
     bool b_update;
-    bool b_savedurls_loaded;
     char *psz_request;
     int update_type;
 } services_discovery_sys_t;
@@ -131,7 +130,6 @@ static int Open( vlc_object_t *p_this )
     vlc_mutex_init( &p_sys->lock );
     vlc_cond_init( &p_sys->wait );
     p_sys->b_update = false;
-    p_sys->b_savedurls_loaded = false;
     p_sys->psz_request = NULL;
     p_sys->update_type = UPDATE_URLS;
 
@@ -274,7 +272,6 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
 
     int i_new_urls = 0;
     char **ppsz_new_urls = NULL;
-    p_sys->b_savedurls_loaded = true;
 
     for( ;; )
     {
@@ -348,14 +345,6 @@ static void ParseRequest( services_discovery_t *p_sd )
     if( !psz_tok ) return;
     *psz_tok = '\0';
 
-    if ( ! p_sys->b_savedurls_loaded )
-    {
-        char *psz_urls = var_GetNonEmptyString( vlc_object_parent(p_sd),
-                                                "podcast-urls" );
-        ParseUrls( p_sd, psz_urls );
-        free( psz_urls );
-    }
-
     if( !strcmp( psz_request, "ADD" ) )
     {
         psz_request = psz_tok + 1;



More information about the vlc-commits mailing list