TAB_APPEND( p_sys->i_handlers, p_sys->pp_handlers, p_handler );
}
}
- if( psz_src != NULL )
- free( psz_src );
+ free( psz_src );
#endif
/* determine SSL configuration */
};
unsigned i;
- if( psz_src != NULL )
- {
- free( psz_src );
- psz_src = NULL;
- }
+ free( psz_src );
+ psz_src = NULL;
for( i = 0; ppsz_paths[i] != NULL; i++ )
if( !DirectoryCheck( ppsz_paths[i] ) )
free( p_sys->pp_files[i]->name );
free( p_sys->pp_files[i] );
}
- if( p_sys->pp_files )
- {
- free( p_sys->pp_files );
- }
+ free( p_sys->pp_files );
for( i = 0; i < p_sys->i_handlers; i++ )
{
http_association_t *p_handler = p_sys->pp_handlers[i];
NULL );
TAB_REMOVE( p_args->p_association->i_argc, p_args->p_association->ppsz_argv,
psz_file );
- if( psz_cwd != NULL )
- free( psz_cwd );
+ free( psz_cwd );
while( i_env )
TAB_REMOVE( i_env, ppsz_env, ppsz_env[0] );
}
}
- if( user )
- {
- free( user );
- }
- if( password )
- {
- free( password );
- }
+ free( user );
+ free( password );
ACL_Destroy( p_acl );
closedir( p_dir );
intf_thread_t *p_intf = (intf_thread_t *)p_this;
/* Destroy structure */
- if( p_intf->p_sys->psz_file )
- free( p_intf->p_sys->psz_file );
+ free( p_intf->p_sys->psz_file );
lirc_freeconfig( p_intf->p_sys->config );
lirc_deinit();
free( p_intf->p_sys );
strcat( psz_path, " --ntservice-extraintf " );
strcat( psz_path, psz_extra );
}
- if( psz_extra ) free( psz_extra );
+ free( psz_extra );
psz_extra = config_GetPsz( p_intf, "ntservice-options" );
if( psz_extra && *psz_extra )
strcat( psz_path, " " );
strcat( psz_path, psz_extra );
}
- if( psz_extra ) free( psz_extra );
+ free( psz_extra );
SC_HANDLE service =
CreateService( handle, p_sys->psz_service, p_sys->psz_service,
free( psz_temp );
}
}
- if( psz_modules )
- {
- free( psz_modules );
- }
+ free( psz_modules );
/* Initialization complete - report running status */
p_sys->status.dwCurrentState = SERVICE_RUNNING;
module_Need( p_sys->p_packetizer, "packetizer", NULL, 0 );
if( !p_sys->p_packetizer->p_module )
{
- if( p_sys->p_packetizer->fmt_in.p_extra )
- free( p_sys->p_packetizer->fmt_in.p_extra );
+ free( p_sys->p_packetizer->fmt_in.p_extra );
vlc_object_release( p_sys->p_packetizer );
msg_Err( p_demux, "cannot find flac packetizer" );
/* Unneed module */
module_Unneed( p_sys->p_packetizer, p_sys->p_packetizer->p_module );
- if( p_sys->p_packetizer->fmt_in.p_extra )
- free( p_sys->p_packetizer->fmt_in.p_extra );
+ free( p_sys->p_packetizer->fmt_in.p_extra );
/* Delete the decoder */
vlc_object_release( p_sys->p_packetizer );
p_sys->i_cover_score = pi_cover_score[i_type];
}
error:
- if( psz_mime )
- free( psz_mime );
- if( psz_description )
- free( psz_description );
+ free( psz_mime );
+ free( psz_description );
}
#undef RM
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- if( p_sys->psz_separator )
- {
- free( p_sys->psz_separator );
- }
+ free( p_sys->psz_separator );
free( p_sys );
}
if( p_box->i_type == FOURCC_alac )
{
- if( p_box->data.p_sample_soun->p_qt_description )
- free( p_box->data.p_sample_soun->p_qt_description );
+ free( p_box->data.p_sample_soun->p_qt_description );
p_box->data.p_sample_soun->p_qt_description = malloc( i_read );
p_box->data.p_sample_soun->i_qt_description = i_read;
demux_t *p_demux = (demux_t*)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
- if( p_sys->p_extra_f )
- free( p_sys->p_extra_f );
+ free( p_sys->p_extra_f );
demux_IndexClean( &p_sys->idx );
free( p_sys );
}
}
static void demux_IndexClean( demux_index_t *p_idx )
{
- if( p_idx->idx )
- {
- free( p_idx->idx );
- p_idx->idx = NULL;
- }
+ free( p_idx->idx );
+ p_idx->idx = NULL;
}
static void demux_IndexAppend( demux_index_t *p_idx,
int64_t i_time, int64_t i_offset )
*/
/* defines */
-#define FREE(v) if (v) {free(v);v=NULL;}
-#define FREE_NAME() if (psz_name) {free(psz_name);psz_name=NULL;}
-#define FREE_VALUE() if (psz_value) {free(psz_value);psz_value=NULL;}
-#define FREE_KEY() if (psz_key) {free(psz_key);psz_key=NULL;}
+#define FREE(v) free(v);v=NULL;
+#define FREE_NAME() free(psz_name);psz_name=NULL;
+#define FREE_VALUE() free(psz_value);psz_value=NULL;
+#define FREE_KEY() free(psz_key);psz_key=NULL;
#define FREE_ATT() FREE_NAME();FREE_VALUE()
#define FREE_ATT_KEY() FREE_NAME();FREE_VALUE();FREE_KEY()
void E_(Close_PLS)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
- if( p_demux->p_sys->psz_prefix )
- {
- free( p_demux->p_sys->psz_prefix );
- }
+ free( p_demux->p_sys->psz_prefix );
free( p_demux->p_sys );
}
{
msg_Warn( p_demux, "no file= part found for item %d", i_item );
}
- if( psz_name )
- {
- free( psz_name );
- psz_name = NULL;
- }
+ free( psz_name );
+ psz_name = NULL;
i_duration = -1;
i_item = i_new_item;
i_new_item = 0;
if( !strncasecmp( psz_key, "file", sizeof("file") -1 ) ||
!strncasecmp( psz_key, "Ref", sizeof("Ref") -1 ) )
{
- if( psz_mrl_orig )
- free( psz_mrl_orig );
+ free( psz_mrl_orig );
psz_mrl_orig =
psz_mrl = E_(ProcessMRL)( psz_value, p_demux->p_sys->psz_prefix );
}
else if( !strncasecmp( psz_key, "title", sizeof("title") -1 ) )
{
- if( psz_name )
- free( psz_name );
+ free( psz_name );
psz_name = strdup( psz_value );
}
else if( !strncasecmp( psz_key, "length", sizeof("length") -1 ) )
{
msg_Warn( p_demux, "no file= part found for item %d", i_item );
}
- if( psz_name )
- {
- free( psz_name );
- psz_name = NULL;
- }
+ free( psz_name );
+ psz_name = NULL;
HANDLE_PLAY_AND_RELEASE;
return 0; /* Needed for correct operation of go back */
int i;
for( i = 0; i < p_sys->i_subtitles; i++ )
- {
- if( p_sys->subtitle[i].psz_text )
- free( p_sys->subtitle[i].psz_text );
- }
- if( p_sys->subtitle )
- free( p_sys->subtitle );
+ free( p_sys->subtitle[i].psz_text );
+ free( p_sys->subtitle );
free( p_sys );
}
}
else
{
- if( es_descr.dec_descr.p_decoder_specific_info != NULL )
- {
- free( es_descr.dec_descr.p_decoder_specific_info );
- es_descr.dec_descr.p_decoder_specific_info = NULL;
- es_descr.dec_descr.i_decoder_specific_info_len = 0;
- }
+ free( es_descr.dec_descr.p_decoder_specific_info );
+ es_descr.dec_descr.p_decoder_specific_info = NULL;
+ es_descr.dec_descr.i_decoder_specific_info_len = 0;
}
}
es_descr.b_ok = 0;
XdsExit( &p_sys->xds );
cc_Exit( &p_sys->cc );
free( p_sys->rec_hdrs );
- if( p_sys->seq_table )
- free( p_sys->seq_table );
+ free( p_sys->seq_table );
free(p_sys);
}
static void XdsExit( xds_t *h )
{
/* */
- if( h->meta.psz_channel_name )
- free( h->meta.psz_channel_name );
- if( h->meta.psz_channel_call_letter )
- free( h->meta.psz_channel_call_letter );
- if( h->meta.psz_channel_number )
- free( h->meta.psz_channel_number );
+ free( h->meta.psz_channel_name );
+ free( h->meta.psz_channel_call_letter );
+ free( h->meta.psz_channel_number );
/* */
- if( h->meta.current.psz_name )
- free( h->meta.current.psz_name );
- if( h->meta.current.psz_rating )
- free( h->meta.current.psz_rating );
+ free( h->meta.current.psz_name );
+ free( h->meta.current.psz_rating );
/* */
- if( h->meta.future.psz_name )
- free( h->meta.future.psz_name );
- if( h->meta.future.psz_rating )
- free( h->meta.future.psz_rating );
+ free( h->meta.future.psz_name );
+ free( h->meta.future.psz_rating );
}
static void XdsStringUtf8( char dst[2*32+1], const uint8_t *p_src, int i_src )
{
if( *ppsz_dst == NULL && psz_new == NULL )
return VLC_FALSE;
- if( *ppsz_dst )
- free( *ppsz_dst );
+ free( *ppsz_dst );
if( psz_new )
*ppsz_dst = strdup( psz_new );
else
entire table directly from the stream into memory in place. */
/* clear the SEQ table */
- if (p_sys->seq_table != NULL)
- free(p_sys->seq_table);
+ free(p_sys->seq_table);
/* parse header info */
stream_Read(p_demux->s, mst_buf, 32);
/*msg_Dbg( p_demux, "chunk has %d records", i_num_recs );*/
- if (p_sys->rec_hdrs)
- free(p_sys->rec_hdrs);
+ free(p_sys->rec_hdrs);
/* skip past the 4 bytes we "peeked" earlier */
stream_Read( p_demux->s, NULL, 4 );