]> git.sesse.net Git - vlc/commitdiff
A bit of cleanup here and there
authorClément Stenac <zorglub@videolan.org>
Sun, 24 Dec 2006 13:50:47 +0000 (13:50 +0000)
committerClément Stenac <zorglub@videolan.org>
Sun, 24 Dec 2006 13:50:47 +0000 (13:50 +0000)
src/misc/configuration.c
src/misc/stats.c
src/network/httpd.c
src/stream_output/profiles.c
src/stream_output/stream_output.c

index edbcfe8f9b3a492adbfae3b3fd3557c3778afba9..a36fc1b76c66d9e6d556905459aea1cf0fe8a0c8 100644 (file)
@@ -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 );
                 }
 
index dbcabff47bc0ea0be8119166d5b7d8eaa4671f6c..10b2e70bc7ec82a6fc84fc6004775e7d0f1ae87b 100644 (file)
@@ -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 )
 {
index e636277e65dd84f568f610a2e3346d14f5832940..6545e3e1d71a9cce7f81797e0a468f5e2fa336d6 100644 (file)
@@ -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 );
 }
 
index fafd2c0ab1dd324f58d4e668ede41faab86b5c46..7156689afb2bc7da58e6e121a50f5d50096f92dd 100644 (file)
@@ -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
index adbb23d8fd122b68d010be81ecce40540a67c33e..b76aa56653d00da71289985ad7b730cfba370af6 100644 (file)
@@ -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 */