]> git.sesse.net Git - vlc/commitdiff
Another bunch of useless test.
authorRémi Duraffort <ivoire@videolan.org>
Wed, 12 Mar 2008 10:54:45 +0000 (11:54 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 12 Mar 2008 11:07:43 +0000 (12:07 +0100)
modules/misc/freetype.c
modules/misc/osd/osd_menu.c
modules/misc/osd/simple.c
modules/misc/quartztext.c
modules/misc/rtsp.c
modules/misc/win32text.c
modules/misc/xml/xtag.c
modules/visualization/galaktos/plugin.c
modules/visualization/goom.c
modules/visualization/visual/effects.c
modules/visualization/visual/fft.c

index 7a64431c6ae22d1a987305fb92dd03f7c54ef409..3ba7a4085e90b9a945bb228f5867fbebd3962ab7 100644 (file)
@@ -318,7 +318,7 @@ static int Create( vlc_object_t *p_this )
     psz_fontfile = val.psz_string;
     if( !psz_fontfile || !*psz_fontfile )
     {
-        if( psz_fontfile ) free( psz_fontfile );
+        free( psz_fontfile );
         psz_fontfile = (char *)malloc( PATH_MAX + 1 );
         if( !psz_fontfile )
         {
@@ -425,7 +425,7 @@ static int Create( vlc_object_t *p_this )
     p_sys->i_default_font_size = val.i_int;
     if( SetFontSize( p_filter, 0 ) != VLC_SUCCESS ) goto error;
 
-    if( psz_fontfile ) free( psz_fontfile );
+    free( psz_fontfile );
 
     p_sys->pp_font_attachments = NULL;
     p_sys->i_font_attachments = 0;
@@ -444,7 +444,7 @@ static int Create( vlc_object_t *p_this )
  error:
     if( p_sys->p_face ) FT_Done_Face( p_sys->p_face );
     if( p_sys->p_library ) FT_Done_FreeType( p_sys->p_library );
-    if( psz_fontfile ) free( psz_fontfile );
+    free( psz_fontfile );
     free( p_sys );
     return VLC_EGENERIC;
 }
@@ -1358,12 +1358,12 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
     else
         RenderYUVA( p_filter, p_region_out, p_lines, result.x, result.y );
 
-    if( psz_unicode_orig ) free( psz_unicode_orig );
+    free( psz_unicode_orig );
     FreeLines( p_lines );
     return VLC_SUCCESS;
 
  error:
-    if( psz_unicode_orig ) free( psz_unicode_orig );
+    free( psz_unicode_orig );
     FreeLines( p_lines );
     return VLC_EGENERIC;
 }
@@ -1393,8 +1393,7 @@ static void DeleteStyle( ft_style_t *p_style )
 {
     if( p_style )
     {
-        if( p_style->psz_fontname )
-            free( p_style->psz_fontname );
+        free( p_style->psz_fontname );
         free( p_style );
     }
 }
@@ -1793,7 +1792,7 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
         {
             if( !strcasecmp( "face", psz_name ) )
             {
-                if( psz_fontname ) free( psz_fontname );
+                free( psz_fontname );
                 psz_fontname = strdup( psz_value );
             }
             else if( !strcasecmp( "size", psz_name ) )
@@ -1968,8 +1967,8 @@ static void SetupKaraoke( xml_reader_t *p_xml_reader, uint32_t *pi_k_runs,
                     (*ppi_k_run_lengths)[ *pi_k_runs - 1 ] = 0;
             }
         }
-        if( psz_name )  free( psz_name );
-        if( psz_value ) free( psz_value );
+        free( psz_name );
+        free( psz_value );
     }
 }
 
@@ -2291,12 +2290,12 @@ static int ProcessLines( filter_t *p_filter,
             ! p_levels )
         {
             msg_Err( p_filter, "out of memory" );
-            if( p_levels )           free( p_levels );
-            if( p_old_positions )    free( p_old_positions );
-            if( p_new_positions )    free( p_new_positions );
-            if( p_fribidi_string )   free( p_fribidi_string );
-            if( pp_char_styles_new ) free( pp_char_styles_new );
-            if( pi_karaoke_bar )     free( pi_karaoke_bar );
+            free( p_levels );
+            free( p_old_positions );
+            free( p_new_positions );
+            free( p_fribidi_string );
+            free( pp_char_styles_new );
+            free( pi_karaoke_bar );
 
             free( pp_char_styles );
             return VLC_ENOMEM;
@@ -2404,8 +2403,8 @@ static int ProcessLines( filter_t *p_filter,
              i_start_pos += pi_k_run_lengths[ k ];
         }
     }
-    if( p_levels )         free( p_levels );
-    if( p_new_positions )  free( p_new_positions );
+    free( p_levels );
+    free( p_new_positions );
 
     FT_Vector tmp_result;
 
@@ -2474,8 +2473,7 @@ static int ProcessLines( filter_t *p_filter,
 #if defined(HAVE_FRIBIDI)
                         free( psz_text );
 #endif
-                        if( pi_karaoke_bar )
-                            free( pi_karaoke_bar );
+                        free( pi_karaoke_bar );
                         return VLC_EGENERIC;
                     }
                     free( psz_fontfile );
@@ -2501,8 +2499,7 @@ static int ProcessLines( filter_t *p_filter,
 #if defined(HAVE_FRIBIDI)
                 free( psz_text );
 #endif
-                if( pi_karaoke_bar )
-                    free( pi_karaoke_bar );
+                free( pi_karaoke_bar );
                 return VLC_EGENERIC;
             }
             p_sys->i_use_kerning =
@@ -2520,8 +2517,7 @@ static int ProcessLines( filter_t *p_filter,
 #if defined(HAVE_FRIBIDI)
                 free( psz_text );
 #endif
-                if( pi_karaoke_bar )
-                    free( pi_karaoke_bar );
+                free( pi_karaoke_bar );
                 return VLC_ENOMEM;
             }
             memcpy( psz_unicode, psz_text + i_prev,
@@ -2540,8 +2536,7 @@ static int ProcessLines( filter_t *p_filter,
 #if defined(HAVE_FRIBIDI)
                         free( psz_text );
 #endif
-                        if( pi_karaoke_bar )
-                            free( pi_karaoke_bar );
+                        free( pi_karaoke_bar );
                         return VLC_ENOMEM;
                     }
                     /* New Color mode only works in YUVA rendering mode --
@@ -2575,8 +2570,7 @@ static int ProcessLines( filter_t *p_filter,
 #if defined(HAVE_FRIBIDI)
                     free( psz_text );
 #endif
-                    if( pi_karaoke_bar )
-                        free( pi_karaoke_bar );
+                    free( pi_karaoke_bar );
                     return VLC_EGENERIC;
                 }
 
@@ -2903,14 +2897,13 @@ static line_desc_t *NewLine( int i_count )
         ( p_line->pi_underline_offset == NULL ) ||
         ( p_line->pi_underline_thickness == NULL ) )
     {
-        if( p_line->pi_underline_thickness )
-            free( p_line->pi_underline_thickness );
-        if( p_line->pi_underline_offset ) free( p_line->pi_underline_offset );
-        if( p_line->p_fg_rgb ) free( p_line->p_fg_rgb );
-        if( p_line->p_bg_rgb ) free( p_line->p_bg_rgb );
-        if( p_line->p_fg_bg_ratio ) free( p_line->p_fg_bg_ratio );
-        if( p_line->p_glyph_pos ) free( p_line->p_glyph_pos );
-        if( p_line->pp_glyphs ) free( p_line->pp_glyphs );
+        free( p_line->pi_underline_thickness );
+        free( p_line->pi_underline_offset );
+        free( p_line->p_fg_rgb );
+        free( p_line->p_bg_rgb );
+        free( p_line->p_fg_bg_ratio );
+        free( p_line->p_glyph_pos );
+        free( p_line->pp_glyphs );
         free( p_line );
         return NULL;
     }
index 1f6fb3ba9872047759a49044addd9eb803fac112..12616075e29f7cdd910f9099bc610eb154516831 100644 (file)
@@ -82,8 +82,8 @@ void osd_MenuFree( osd_menu_t *p_menu )
     msg_Dbg( p_menu, "freeing menu" );
     osd_ButtonFree( p_menu, p_menu->p_button );
 
-    if( p_menu->psz_path ) free( p_menu->psz_path );
-    if( p_menu->p_state ) free( p_menu->p_state );
+    free( p_menu->psz_path );
+    free( p_menu->p_state );
 
     p_menu->p_button = NULL;
     p_menu->p_last_button = NULL;
@@ -135,18 +135,15 @@ void osd_ButtonFree( osd_menu_t *p_menu, osd_button_t *p_button )
         p_current = p_prev;
         if( p_current->p_next )
         {
-            if( p_current->p_next->psz_name )
-                free( p_current->p_next->psz_name );
-            if( p_current->p_next->psz_action )
-                free( p_current->p_next->psz_action );
-            if( p_current->p_next->psz_action_down )
-                free( p_current->p_next->psz_action_down );
-            if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
-                free( p_current->p_feedback->p_data_orig );
+            free( p_current->p_next->psz_name );
+            free( p_current->p_next->psz_action );
+            free( p_current->p_next->psz_action_down );
             if( p_current->p_feedback )
+            {
+                free( p_current->p_feedback->p_data_orig );
                 free( p_current->p_feedback );
-
-            p_current->p_feedback = NULL;
+                p_current->p_feedback = NULL;
+            }
 
             /* Free all states first */
             if( p_current->p_next->p_states )
@@ -158,16 +155,14 @@ void osd_ButtonFree( osd_menu_t *p_menu, osd_button_t *p_button )
 
         if( p_current->p_up )
         {
-            if( p_current->p_up->psz_name )
-                free( p_current->p_up->psz_name );
-            if( p_current->p_up->psz_action )
-                free( p_current->p_up->psz_action );
-            if( p_current->p_up->psz_action_down )
-                free( p_current->p_up->psz_action_down );
-            if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
-                free( p_current->p_feedback->p_data_orig );
+            free( p_current->p_up->psz_name );
+            free( p_current->p_up->psz_action );
+            free( p_current->p_up->psz_action_down );
             if( p_current->p_feedback )
+            {
+                free( p_current->p_feedback->p_data_orig );
                 free( p_current->p_feedback );
+            }
 
             p_current->p_feedback = NULL;
 
@@ -183,14 +178,15 @@ void osd_ButtonFree( osd_menu_t *p_menu, osd_button_t *p_button )
     {
         msg_Dbg( p_menu, "+ freeing button %s [%p]",
                  p_button->psz_action, p_button );
-        if( p_button->psz_name ) free( p_button->psz_name );
-        if( p_button->psz_action ) free( p_button->psz_action );
-        if( p_button->psz_action_down ) free( p_button->psz_action_down );
-        if( p_current->p_feedback && p_current->p_feedback->p_data_orig )
-            free( p_current->p_feedback->p_data_orig );
+        free( p_button->psz_name );
+        free( p_button->psz_action );
+        free( p_button->psz_action_down );
         if( p_current->p_feedback )
+        {
+            free( p_current->p_feedback->p_data_orig );
             free( p_current->p_feedback );
-        p_current->p_feedback = NULL;
+            p_current->p_feedback = NULL;
+        }
 
         if( p_button->p_states )
             osd_StatesFree( p_menu, p_button->p_states );
@@ -268,12 +264,10 @@ void osd_StatesFree( osd_menu_t *p_menu, osd_state_t *p_states )
         {
             if( p_state->p_next->p_pic )
             {
-                if( p_state->p_next->p_pic->p_data_orig )
-                    free( p_state->p_next->p_pic->p_data_orig );
+                free( p_state->p_next->p_pic->p_data_orig );
                 free( p_state->p_next->p_pic );
             }
-            if( p_state->p_next->psz_state )
-                free( p_state->p_next->psz_state );
+            free( p_state->p_next->psz_state );
             free( p_state->p_next );
             p_state->p_next = NULL;
         }
@@ -285,11 +279,10 @@ void osd_StatesFree( osd_menu_t *p_menu, osd_state_t *p_states )
                  p_state->psz_state, p_states );
         if( p_states->p_pic )
         {
-            if( p_states->p_pic->p_data_orig )
-                free( p_states->p_pic->p_data_orig );
+            free( p_states->p_pic->p_data_orig );
             free( p_states->p_pic );
         }
-        if( p_state->psz_state ) free( p_state->psz_state );
+        free( p_state->psz_state );
         free( p_states );
         p_states = NULL;
     }
index 88c66336e1c118db18c1bb658b8feaff140473eb..0523b75b4350b27b9238ba43c28615fe859dc127 100644 (file)
@@ -236,7 +236,7 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
                     msg_Dbg( p_this, " + (menu up) hotkey down %s, file=%s%s",
                              &action[0], p_menu->psz_path, &file[0] );
 
-                    if( p_up->psz_action_down ) free( p_up->psz_action_down );
+                    free( p_up->psz_action_down );
                     p_up->psz_action_down = strdup( &action[0] );
 
                     /* Parse range contstruction :
@@ -335,8 +335,7 @@ int osd_parser_simpleOpen( vlc_object_t *p_this )
 
                 msg_Dbg( p_this, " + hotkey down %s, file=%s%s", 
                          &action[0], p_menu->psz_path, &file[0] );
-                if( p_current->psz_action_down ) 
-                    free( p_current->psz_action_down );
+                free( p_current->psz_action_down );
                 p_current->psz_action_down = strdup( &action[0] );
 
                 /* Parse range contstruction :
index 551f5a8da546e84565dae126cd144aeb23c1c190..34b7f513183b0b07d968dc73ddb9de7a951ae0f5 100644 (file)
@@ -183,8 +183,7 @@ static void Destroy( vlc_object_t *p_this )
         free( p_sys->p_fonts );
     }
 
-    if( p_sys->psz_font_name ) free( p_sys->psz_font_name );
-
+    free( p_sys->psz_font_name );
     free( p_sys );
 }
 
@@ -598,7 +597,7 @@ static int HandleFontAttributes( xml_reader_t *p_xml_reader,
         {
             if( !strcasecmp( "face", psz_name ) )
             {
-                if( psz_fontname ) free( psz_fontname );
+                free( psz_fontname );
                 psz_fontname = strdup( psz_value );
             }
             else if( !strcasecmp( "size", psz_name ) )
index 0b3f54ab0b09db21a32ff2a30255ef373dedde98..9f28f013b175364f16f89d4375bda71a7e4bc3d2 100644 (file)
@@ -257,7 +257,7 @@ static int Open( vlc_object_t *p_this )
 
     psz_url = config_GetPsz( p_vod, "rtsp-host" );
     vlc_UrlParse( &url, psz_url, 0 );
-    if( psz_url ) free( psz_url );
+    free( psz_url );
 
     if( url.i_port <= 0 ) url.i_port = 554;
 
@@ -310,9 +310,12 @@ static int Open( vlc_object_t *p_this )
     return VLC_SUCCESS;
 
 error:
-    if( p_sys && p_sys->p_rtsp_host ) httpd_HostDelete( p_sys->p_rtsp_host );
-    if( p_sys && p_sys->psz_raw_mux ) free( p_sys->psz_raw_mux );
-    if( p_sys ) free( p_sys );
+    if( p_sys )
+    {
+        if( p_sys->p_rtsp_host ) httpd_HostDelete( p_sys->p_rtsp_host );
+        free( p_sys->psz_raw_mux );
+        free( p_sys );
+    }
     vlc_UrlClean( &url );
 
     return VLC_EGENERIC;
@@ -459,9 +462,9 @@ static void MediaDel( vod_t *p_vod, vod_media_t *p_media )
     TAB_CLEAN( p_media->i_rtsp, p_media->rtsp );
 
     httpd_UrlDelete( p_media->p_rtsp_url );
-    if( p_media->psz_rtsp_path ) free( p_media->psz_rtsp_path );
-    if( p_media->psz_rtsp_control_v6 ) free( p_media->psz_rtsp_control_v6 );
-    if( p_media->psz_rtsp_control_v4 ) free( p_media->psz_rtsp_control_v4 );
+    free( p_media->psz_rtsp_path );
+    free( p_media->psz_rtsp_control_v6 );
+    free( p_media->psz_rtsp_control_v4 );
 
     while( p_media->i_es )
         MediaDelES( p_vod, p_media, &p_media->es[0]->fmt );
@@ -469,12 +472,11 @@ static void MediaDel( vod_t *p_vod, vod_media_t *p_media )
 
     vlc_mutex_destroy( &p_media->lock );
 
-    if( p_media->psz_session_name ) free( p_media->psz_session_name );
-    if( p_media->psz_session_description )
-        free( p_media->psz_session_description );
-    if( p_media->psz_session_url ) free( p_media->psz_session_url );
-    if( p_media->psz_session_email ) free( p_media->psz_session_email );
-    if( p_media->psz_mux ) free( p_media->psz_mux );
+    free( p_media->psz_session_name );
+    free( p_media->psz_session_description );
+    free( p_media->psz_session_url );
+    free( p_media->psz_session_email );
+    free( p_media->psz_mux );
     free( p_media );
 }
 
@@ -486,7 +488,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
     if( !p_es ) return VLC_ENOMEM;
     memset( p_es, 0, sizeof(media_es_t) );
 
-    if( p_media->psz_mux ) free( p_media->psz_mux );
+    free( p_media->psz_mux );
     p_media->psz_mux = NULL;
 
     /* TODO: update SDP, etc... */
@@ -587,10 +589,8 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
                                   "sprop-parameter-sets=%s,%s;", hexa, p_64_sps,
                                   p_64_pps ) < 0 )
                         return VLC_ENOMEM;
-                if( p_64_sps )
-                    free( p_64_sps );
-                if( p_64_pps )
-                    free( p_64_pps );
+                free( p_64_sps );
+                free( p_64_pps );
             }
             if( !p_es->psz_fmtp )
                 p_es->psz_fmtp = strdup( "packetization-mode=1" );
@@ -740,8 +740,8 @@ static void MediaDelES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt)
     TAB_REMOVE( p_media->i_es, p_media->es, p_es );
     vlc_mutex_unlock( &p_media->lock );
 
-    if( p_es->psz_rtpmap ) free( p_es->psz_rtpmap );
-    if( p_es->psz_fmtp ) free( p_es->psz_fmtp );
+    free( p_es->psz_rtpmap );
+    free( p_es->psz_fmtp );
     p_media->i_sdp_version++;
 
     if( p_es->p_rtsp_url ) httpd_UrlDelete( p_es->p_rtsp_url );
@@ -850,10 +850,8 @@ static void CommandThread( vlc_object_t *p_this )
 
     next:
         vlc_mutex_unlock( &p_sys->lock_media );
-        if( cmd.psz_session )
-            free( cmd.psz_session );
-        if( cmd.psz_arg )
-            free( cmd.psz_arg );
+        free( cmd.psz_session );
+        free( cmd.psz_arg );
     }
 }
 
@@ -899,8 +897,7 @@ static void RtspClientDel( vod_media_t *p_media, rtsp_client_t *p_rtsp )
 
     while( p_rtsp->i_es-- )
     {
-        if( p_rtsp->es[p_rtsp->i_es]->psz_ip )
-            free( p_rtsp->es[p_rtsp->i_es]->psz_ip );
+        free( p_rtsp->es[p_rtsp->i_es]->psz_ip );
         free( p_rtsp->es[p_rtsp->i_es] );
         if( !p_rtsp->i_es ) free( p_rtsp->es );
     }
@@ -958,7 +955,7 @@ static int RtspCallback( httpd_callback_sys_t *p_args, httpd_client_t *cl,
                 if( strstr( psz_transport, "MP2T/H2221/UDP" ) ||
                     strstr( psz_transport, "RAW/RAW/UDP" ) )
                 {
-                    if( p_media->psz_mux ) free( p_media->psz_mux );
+                    free( p_media->psz_mux );
                     p_media->psz_mux = NULL;
                     p_media->psz_mux = strdup( p_vod->p_sys->psz_raw_mux );
                     p_media->b_raw = VLC_TRUE;
@@ -1454,7 +1451,7 @@ static int RtspCallbackES( httpd_callback_sys_t *p_args, httpd_client_t *cl,
             {
                 if( p_rtsp->es[i]->p_media_es == p_es )
                 {
-                    if( p_rtsp->es[i]->psz_ip ) free( p_rtsp->es[i]->psz_ip );
+                    free( p_rtsp->es[i]->psz_ip );
                     TAB_REMOVE( p_rtsp->i_es, p_rtsp->es, p_rtsp->es[i] );
                     break;
                 }
index 7c35f9361c0b4b2721d62129506c261c5fa09582..0541e01d8cc11eca534f4d530a2295f769bf4563 100644 (file)
@@ -183,13 +183,13 @@ static int Create( vlc_object_t *p_this )
     p_sys->i_default_font_size = val.i_int;
     if( SetFont( p_filter, 0 ) != VLC_SUCCESS ) goto error;
 
-    if( psz_fontfile ) free( psz_fontfile );
+    free( psz_fontfile );
     p_filter->pf_render_text = RenderText;
     p_filter->pf_render_html = NULL;
     return VLC_SUCCESS;
 
  error:
-    if( psz_fontfile ) free( psz_fontfile );
+    free( psz_fontfile );
     free( p_sys );
     return VLC_EGENERIC;
 }
index 33021b6c892c9b3cf2636de63e661ff5feb1e5bc..7cab50b62a1fe70c822d25c24ed6ea5f98e0eb9b 100644 (file)
@@ -185,7 +185,8 @@ static xml_reader_t *ReaderCreate( xml_t *p_xml, stream_t *s )
         i_pos += i_size;
         i_buffer += i_size;
         p_new = realloc( p_buffer, i_buffer );
-        if (!p_new) {
+        if( !p_new )
+        {
             msg_Err( p_xml, "out of memory" );
             free( p_buffer );
             return NULL;
@@ -744,15 +745,15 @@ static XTag *xtag_free( XTag *xtag )
 
     if( xtag == NULL ) return NULL;
 
-    if( xtag->name ) free( xtag->name );
-    if( xtag->pcdata ) free( xtag->pcdata );
+    free( xtag->name );
+    free( xtag->pcdata );
 
     for( l = xtag->attributes; l; l = l->next )
     {
         if( (attr = (XAttribute *)l->data) != NULL )
         {
-            if( attr->name ) free( attr->name );
-            if( attr->value ) free( attr->value );
+            free( attr->name );
+            free( attr->value );
             free( attr );
         }
     }
index c9672b83bc9b0bf1df5cba43ba6585d1a6cdbf09..7e1db91c75164e98cf1be46ede7dfb581ad1be56 100644 (file)
@@ -123,7 +123,7 @@ static int Open( vlc_object_t *p_this )
                            VLC_THREAD_PRIORITY_LOW, VLC_FALSE ) )
     {
         msg_Err( p_filter, "cannot lauch galaktos thread" );
-        if( p_thread->psz_title ) free( p_thread->psz_title );
+        free( p_thread->psz_title );
         vlc_object_detach( p_thread );
         vlc_object_release( p_thread );
         free( p_sys );
@@ -247,11 +247,8 @@ static void Thread( vlc_object_t *p_this )
         {
             vlc_object_kill( p_thread );
         }
-        if( p_thread->psz_title )
-        {
-            free( p_thread->psz_title );
-            p_thread->psz_title = NULL;
-        }
+        free( p_thread->psz_title );
+        p_thread->psz_title = NULL;
 
         if (++count%100==0)
         {
index 3148584aa90145431f1cfcc36b96b8191af0f317..658d6880118152b8d9a7068e96a7c0dcbe1d86a9 100644 (file)
@@ -198,7 +198,7 @@ static int Open( vlc_object_t *p_this )
         vout_Destroy( p_thread->p_vout );
         vlc_mutex_destroy( &p_thread->lock );
         vlc_cond_destroy( &p_thread->wait );
-        if( p_thread->psz_title ) free( p_thread->psz_title );
+        free( p_thread->psz_title );
         vlc_object_detach( p_thread );
         vlc_object_release( p_thread );
         free( p_sys );
@@ -354,11 +354,8 @@ static void Thread( vlc_object_t *p_this )
         plane = goom_update( p_plugin_info, p_data, 0, 0.0,
                              p_thread->psz_title, NULL );
 
-        if( p_thread->psz_title )
-        {
-            free( p_thread->psz_title );
-            p_thread->psz_title = NULL;
-        }
+        free( p_thread->psz_title );
+        p_thread->psz_title = NULL;
 
         while( !( p_pic = vout_CreatePicture( p_thread->p_vout, 0, 0, 0 ) ) &&
                !p_thread->b_die )
index 058d32ce1a68ae4eecafc9f5f7408e90b3e89a36..5585d7d0c554e35df90c55b37781cc2ff0063a5d 100644 (file)
@@ -310,15 +310,11 @@ int spectrum_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
 
     fft_close( p_state );
 
-    if( p_s16_buff != NULL )
-    {
-        free( p_s16_buff );
-        p_s16_buff = NULL;
-    }
-
-    if(height) free(height);
+    free( p_s16_buff );
+    p_s16_buff = NULL;
 
-    if(psz_parse) free(psz_parse);
+    free( height );
+    free( psz_parse );
 
     return 0;
 }
@@ -768,15 +764,11 @@ int spectrometer_Run(visual_effect_t * p_effect, aout_instance_t *p_aout,
 
     fft_close( p_state );
 
-    if( p_s16_buff != NULL )
-    {
-        free( p_s16_buff );
-        p_s16_buff = NULL;
-    }
-
-    if(height) free(height);
+    free( p_s16_buff );
+    p_s16_buff = NULL;
 
-    if(psz_parse) free(psz_parse);
+    free( height );
+    free( psz_parse );
 
     return 0;
 }
index fa663965654b44836deede65c75f766151f32944..82bd591bb1c52b604905a3f7567f18142e39dddf 100644 (file)
@@ -109,7 +109,7 @@ void fft_perform(const sound_sample *input, float *output, fft_state *state) {
  * Free the state.
  */
 void fft_close(fft_state *state) {
-    if(state) free(state);
+    free( state );
 }
 
 /*****************************************************************************