]> git.sesse.net Git - vlc/commitdiff
Don't reinvent free()
authorRémi Denis-Courmont <rem@videolan.org>
Tue, 2 Oct 2007 15:23:28 +0000 (15:23 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Tue, 2 Oct 2007 15:23:28 +0000 (15:23 +0000)
modules/access/http.c

index 1a278d75b10f8e3f5407ad28cd857bcd0c8abd92..a1d1d4a8a4f6b35db0d14c3a587c140efb36af9f 100644 (file)
@@ -346,10 +346,10 @@ connect:
         /* Clean up current Open() run */
         vlc_UrlClean( &p_sys->url );
         vlc_UrlClean( &p_sys->proxy );
-        if( p_sys->psz_mime ) free( p_sys->psz_mime );
-        if( p_sys->psz_pragma ) free( p_sys->psz_pragma );
-        if( p_sys->psz_location ) free( p_sys->psz_location );
-        if( p_sys->psz_user_agent ) free( p_sys->psz_user_agent );
+        free( p_sys->psz_mime );
+        free( p_sys->psz_pragma );
+        free( p_sys->psz_location );
+        free( p_sys->psz_user_agent );
 
         Disconnect( p_access );
         free( p_sys );
@@ -419,10 +419,10 @@ connect:
 error:
     vlc_UrlClean( &p_sys->url );
     vlc_UrlClean( &p_sys->proxy );
-    if( p_sys->psz_mime ) free( p_sys->psz_mime );
-    if( p_sys->psz_pragma ) free( p_sys->psz_pragma );
-    if( p_sys->psz_location ) free( p_sys->psz_location );
-    if( p_sys->psz_user_agent ) free( p_sys->psz_user_agent );
+    free( p_sys->psz_mime );
+    free( p_sys->psz_pragma );
+    free( p_sys->psz_location );
+    free( p_sys->psz_user_agent );
 
     Disconnect( p_access );
     free( p_sys );
@@ -440,15 +440,15 @@ static void Close( vlc_object_t *p_this )
     vlc_UrlClean( &p_sys->url );
     vlc_UrlClean( &p_sys->proxy );
 
-    if( p_sys->psz_mime ) free( p_sys->psz_mime );
-    if( p_sys->psz_pragma ) free( p_sys->psz_pragma );
-    if( p_sys->psz_location ) free( p_sys->psz_location );
+    free( p_sys->psz_mime );
+    free( p_sys->psz_pragma );
+    free( p_sys->psz_location );
 
-    if( p_sys->psz_icy_name ) free( p_sys->psz_icy_name );
-    if( p_sys->psz_icy_genre ) free( p_sys->psz_icy_genre );
-    if( p_sys->psz_icy_title ) free( p_sys->psz_icy_title );
+    free( p_sys->psz_icy_name );
+    free( p_sys->psz_icy_genre );
+    free( p_sys->psz_icy_title );
 
-    if( p_sys->psz_user_agent ) free( p_sys->psz_user_agent );
+    free( p_sys->psz_user_agent );
 
     Disconnect( p_access );
     free( p_sys );
@@ -769,13 +769,13 @@ static int Connect( access_t *p_access, int64_t i_tell )
     vlc_url_t      srv = p_sys->b_proxy ? p_sys->proxy : p_sys->url;
 
     /* Clean info */
-    if( p_sys->psz_location ) free( p_sys->psz_location );
-    if( p_sys->psz_mime ) free( p_sys->psz_mime );
-    if( p_sys->psz_pragma ) free( p_sys->psz_pragma );
+    free( p_sys->psz_location );
+    free( p_sys->psz_mime );
+    free( p_sys->psz_pragma );
 
-    if( p_sys->psz_icy_genre ) free( p_sys->psz_icy_genre );
-    if( p_sys->psz_icy_name ) free( p_sys->psz_icy_name );
-    if( p_sys->psz_icy_title ) free( p_sys->psz_icy_title );
+    free( p_sys->psz_icy_genre );
+    free( p_sys->psz_icy_name );
+    free( p_sys->psz_icy_title );
 
 
     p_sys->psz_location = NULL;