[vlc-commits] http: remove useless variable

Rémi Denis-Courmont git at videolan.org
Wed Jan 13 22:59:24 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jan 13 23:58:45 2016 +0200| [e5e0eacc6b554c90d5244d090b3bc75d90568ca0] | committer: Rémi Denis-Courmont

http: remove useless variable

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

 modules/access/http.c |   12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/modules/access/http.c b/modules/access/http.c
index be17bcc..be91089 100644
--- a/modules/access/http.c
+++ b/modules/access/http.c
@@ -148,7 +148,6 @@ struct access_sys_t
 
     /* */
     int        i_code;
-    const char *psz_protocol;
 
     char       *psz_mime;
     char       *psz_location;
@@ -1097,15 +1096,16 @@ static int Request( access_t *p_access, uint64_t i_tell )
     }
     if( !strncmp( psz, "HTTP/1.", 7 ) )
     {
-        p_sys->psz_protocol = "HTTP";
         p_sys->i_code = atoi( &psz[9] );
+        msg_Dbg( p_access, "HTTP answer code %d", p_sys->i_code );
     }
     else if( !strncmp( psz, "ICY", 3 ) )
     {
-        p_sys->psz_protocol = "ICY";
         p_sys->i_code = atoi( &psz[4] );
+        msg_Dbg( p_access, "ICY answer code %d", p_sys->i_code );
         p_sys->b_icecast = true;
         p_sys->b_reconnect = true;
+        p_sys->b_seekable = false;
     }
     else
     {
@@ -1113,12 +1113,6 @@ static int Request( access_t *p_access, uint64_t i_tell )
         free( psz );
         goto error;
     }
-    msg_Dbg( p_access, "protocol '%s' answer code %d",
-             p_sys->psz_protocol, p_sys->i_code );
-    if( !strcmp( p_sys->psz_protocol, "ICY" ) )
-    {
-        p_sys->b_seekable = false;
-    }
     if( p_sys->i_code != 206 && p_sys->i_code != 401 )
     {
         p_sys->b_seekable = false;



More information about the vlc-commits mailing list