From 0274be8790164dccf71b9f4574b57a47e4a88c70 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Wed, 12 Mar 2008 12:06:29 +0100 Subject: [PATCH] The last but not the least commit about these useless tests. --- modules/access_output/shout.c | 8 ++++---- modules/codec/ffmpeg/encoder.c | 2 +- modules/control/http/macro.c | 4 ++-- modules/control/http/mvar.c | 3 +-- modules/control/netsync.c | 2 +- modules/control/rc.c | 12 ++++++------ modules/control/telnet.c | 7 +++---- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/modules/access_output/shout.c b/modules/access_output/shout.c index 15d7ae8cc5..21373ebc3e 100644 --- a/modules/access_output/shout.c +++ b/modules/access_output/shout.c @@ -263,10 +263,10 @@ static int Open( vlc_object_t *p_this ) return VLC_EGENERIC; } - if( psz_name ) free( psz_name ); - if( psz_description ) free( psz_description ); - if( psz_genre ) free( psz_genre ); - if( psz_url ) free( psz_url ); + free( psz_name ); + free( psz_description ); + free( psz_genre ); + free( psz_url ); var_Get( p_access, SOUT_CFG_PREFIX "mp3", &val ); if( val.b_bool == VLC_TRUE ) diff --git a/modules/codec/ffmpeg/encoder.c b/modules/codec/ffmpeg/encoder.c index ac00f2f397..b74de24cf2 100644 --- a/modules/codec/ffmpeg/encoder.c +++ b/modules/codec/ffmpeg/encoder.c @@ -399,7 +399,7 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) p_sys->i_aac_profile = FF_PROFILE_UNKNOWN; } } - if( val.psz_string ) free( val.psz_string ); + free( val.psz_string ); #endif if( p_enc->fmt_in.i_cat == VIDEO_ES ) diff --git a/modules/control/http/macro.c b/modules/control/http/macro.c index 95fcf0352e..6971c992ac 100644 --- a/modules/control/http/macro.c +++ b/modules/control/http/macro.c @@ -390,7 +390,7 @@ static void MacroDo( httpd_file_sys_t *p_args, } } - if( p_items ) free( p_items ); + free( p_items ); break; } case MVLC_KEEP: @@ -432,7 +432,7 @@ static void MacroDo( httpd_file_sys_t *p_args, } } - if( p_items ) free( p_items ); + free( p_items ); break; } case MVLC_EMPTY: diff --git a/modules/control/http/mvar.c b/modules/control/http/mvar.c index bdbe91c3ae..ae87e711bf 100644 --- a/modules/control/http/mvar.c +++ b/modules/control/http/mvar.c @@ -626,8 +626,7 @@ mvar_t *E_(mvar_FileSetNew)( intf_thread_t *p_intf, char *name, } free( psz_dir ); - if( ppsz_dir_content != NULL ) - free( ppsz_dir_content ); + free( ppsz_dir_content ); return s; } diff --git a/modules/control/netsync.c b/modules/control/netsync.c index 60e4937587..5bcfa14252 100644 --- a/modules/control/netsync.c +++ b/modules/control/netsync.c @@ -158,7 +158,7 @@ static void Run( intf_thread_t *p_intf ) else i_socket = net_ConnectUDP( VLC_OBJECT(p_intf), psz_master, NETSYNC_PORT, 0 ); - if( psz_master ) free( psz_master ); + free( psz_master ); if( i_socket < 0 ) { diff --git a/modules/control/rc.c b/modules/control/rc.c index 8e544c047a..e771248ddc 100644 --- a/modules/control/rc.c +++ b/modules/control/rc.c @@ -1270,7 +1270,7 @@ static int Input( vlc_object_t *p_this, char const *psz_cmd, &val, &text ); msg_rc( "+----[ end of %s ]", val_name.psz_string ); - if( val_name.psz_string ) free( val_name.psz_string ); + free( val_name.psz_string ); i_error = VLC_SUCCESS; } @@ -1778,7 +1778,7 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd, &val, &text ); msg_rc( "+----[ end of %s ]", val_name.psz_string ); - if( val_name.psz_string ) free( val_name.psz_string ); + free( val_name.psz_string ); i_error = VLC_SUCCESS; } @@ -1865,7 +1865,7 @@ static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd, &val, &text ); msg_rc( "+----[ end of %s ]", val_name.psz_string ); - if( val_name.psz_string ) free( val_name.psz_string ); + free( val_name.psz_string ); i_error = VLC_SUCCESS; } else @@ -1933,12 +1933,12 @@ static int Menu( vlc_object_t *p_this, char const *psz_cmd, { msg_rc( _("Please provide one of the following parameters:") ); msg_rc( "[on|off|up|down|left|right|select]" ); - if( val.psz_string ) free( val.psz_string ); - return i_error; + free( val.psz_string ); + return i_error; } i_error = VLC_SUCCESS; - if( val.psz_string ) free( val.psz_string ); + free( val.psz_string ); return i_error; } diff --git a/modules/control/telnet.c b/modules/control/telnet.c index 6a10b0b3ad..d27f4ac98b 100644 --- a/modules/control/telnet.c +++ b/modules/control/telnet.c @@ -230,7 +230,7 @@ static void Close( vlc_object_t *p_this ) free( cl ); p_sys->clients[i] = NULL; } - if( p_sys->clients != NULL ) free( p_sys->clients ); + free( p_sys->clients ); net_ListenClose( p_sys->pi_fd ); @@ -515,8 +515,7 @@ static void Run( intf_thread_t *p_intf ) TAB_APPEND( p_sys->i_clients, p_sys->clients, cl ); } } - if( psz_password ) - free( psz_password ); + free( psz_password ); } static void Write_message( telnet_client_t *client, vlm_message_t *message, @@ -526,7 +525,7 @@ static void Write_message( telnet_client_t *client, vlm_message_t *message, client->p_buffer_read = client->buffer_read; (client->p_buffer_read)[0] = 0; // if (cl->p_buffer_read)[0] = '\n' - if( client->buffer_write ) free( client->buffer_write ); + free( client->buffer_write ); /* generate the psz_message string */ if( message ) -- 2.39.2