[vlc-devel] [PATCH] access/satip: remove write-only variable

Rémi Denis-Courmont remi at remlab.net
Wed Mar 1 15:14:16 CET 2017


On March 1, 2017 10:52:09 AM GMT+02:00, "Filip Roséen" <filip at atch.se> wrote:
>---
> modules/access/satip.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
>diff --git a/modules/access/satip.c b/modules/access/satip.c
>index 7653752438..b325283738 100644
>--- a/modules/access/satip.c
>+++ b/modules/access/satip.c
>@@ -645,10 +645,8 @@ static int satip_open(vlc_object_t *obj)
>     for (unsigned i = 0; i < strlen(psz_lower_url); i++)
>         psz_lower_url[i] = tolower(psz_lower_url[i]);
> 
>-    const char* psz_lower_location = strstr( psz_lower_url, "://" );
>-    if ( psz_lower_location == NULL )
>+    if( strstr( psz_lower_url, "://" ) == NULL )
>         goto error;
>-    psz_lower_location += 3;
> 
>     vlc_UrlParse(&url, psz_lower_url);
>     if (url.i_port <= 0)
>-- 
>2.12.0
>
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

Valid point but isn't the strstr() too redundant with UrlParse?
-- 
Rémi Denis-Courmont


More information about the vlc-devel mailing list