Commit eedba76b authored by Clément Stenac's avatar Clément Stenac

A bit of cleanup here and there

parent 8e315515
......@@ -637,20 +637,11 @@ void config_Free( module_t *p_module )
{
module_config_t *p_item = p_module->p_config + j;
if( p_item->psz_type )
free( p_item->psz_type );
if( p_item->psz_name )
free( p_item->psz_name );
if( p_item->psz_current )
free( p_item->psz_current );
if( p_item->psz_text )
free( p_item->psz_text );
if( p_item->psz_longtext )
free( p_item->psz_longtext );
free( (char*) p_item->psz_type );
free( (char*) p_item->psz_name );
free( (char*) p_item->psz_current );
free( (char*) p_item->psz_text );
free( (char*) p_item->psz_longtext );
if (IsConfigStringType (p_item->i_type))
{
......@@ -664,9 +655,9 @@ void config_Free( module_t *p_module )
for( i = 0; i < p_item->i_list; i++ )
{
if( p_item->ppsz_list && p_item->ppsz_list[i] )
free( p_item->ppsz_list[i] );
free( (char*) p_item->ppsz_list[i] );
if( p_item->ppsz_list_text && p_item->ppsz_list_text[i] )
free( p_item->ppsz_list_text[i] );
free( (char*) p_item->ppsz_list_text[i] );
}
if( p_item->ppsz_list ) free( p_item->ppsz_list );
if( p_item->ppsz_list_text ) free( p_item->ppsz_list_text );
......@@ -677,8 +668,7 @@ void config_Free( module_t *p_module )
{
for( i = 0; i < p_item->i_action; i++ )
{
if( p_item->ppsz_action_text[i] )
free( p_item->ppsz_action_text[i] );
free( (char*) p_item->ppsz_action_text[i] );
}
if( p_item->ppf_action ) free( p_item->ppf_action );
if( p_item->ppsz_action_text ) free( p_item->ppsz_action_text );
......@@ -942,8 +932,8 @@ int __config_LoadConfigFile( vlc_object_t *p_this, const char *psz_module_name )
vlc_mutex_lock( p_item->p_lock );
/* free old string */
free (p_item->value.psz);
free (p_item->saved.psz);
free( (char*) p_item->value.psz );
free( (char*) p_item->saved.psz );
p_item->value.psz = convert (psz_option_value);
p_item->saved.psz = strdupnull (p_item->value.psz);
......@@ -1543,7 +1533,7 @@ int __config_LoadCmdLine( vlc_object_t *p_this, int *pi_argc, char *ppsz_argv[],
"You should use --%s instead.\n",
p_conf->psz_name, p_conf->psz_current);
}
psz_name=p_conf->psz_current;
psz_name = p_conf->psz_current;
p_conf = config_FindConfig( p_this, psz_name );
}
......
......@@ -256,14 +256,6 @@ void __stats_ComputeGlobalStats( vlc_object_t *p_obj, global_stats_t *p_stats )
vlc_mutex_unlock( &p_stats->lock );
}
void stats_ReinitGlobalStats( global_stats_t *p_stats )
{
vlc_mutex_lock( &p_stats->lock );
p_stats->f_input_bitrate = p_stats->f_output_bitrate = 0.0;
vlc_mutex_unlock( &p_stats->lock );
}
void __stats_TimerStart( vlc_object_t *p_obj, const char *psz_name,
unsigned int i_id )
{
......
......@@ -1443,7 +1443,7 @@ void httpd_MsgAdd( httpd_message_t *msg, const char *name, const char *psz_value
name = strdup( name );
TAB_APPEND( msg->i_name, msg->name, name );
TAB_APPEND( msg->i_name, msg->name, (char*)name );
TAB_APPEND( msg->i_value, msg->value, value );
}
......
......@@ -281,7 +281,7 @@ void streaming_ParameterApply( sout_param_t *p_param, char **ppsz_dest,
msg_Err( p_this, "unahandled access %s", STDM->psz_access ); \
}
#if 0
/**
* Try to convert a chain to a gui descriptor. This is only possible for
* "simple" chains.
......@@ -354,6 +354,7 @@ vlc_bool_t streaming_ChainToGuiDesc( vlc_object_t *p_this,
return VLC_TRUE;
}
#endif
#define HANDLE_GUI_URL( type, access ) if( pd->b_##type ) { \
if( p_dup ) streaming_DupAddChild( p_dup ); \
......@@ -508,6 +509,7 @@ char * streaming_ChainToPsz( sout_chain_t *p_chain )
* Handle streaming profiles
**********************************************************************/
#if 0
/**
* List the available profiles. Fills the pp_profiles list with preinitialized
* values.
......@@ -543,3 +545,4 @@ int streaming_ProfileParse( vlc_object_t *p_this,streaming_profile_t *p_profile,
}
return VLC_SUCCESS;
}
#endif
......@@ -609,8 +609,8 @@ static int mrl_Parse( mrl_t *p_mrl, const char *psz_mrl )
{
char * psz_dup = strdup( psz_mrl );
char * psz_parser = psz_dup;
char * psz_access;
char * psz_way;
const char * psz_access;
const char * psz_way;
char * psz_name;
/* *** first parse psz_dest */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment