misc: remove unnecessary cast when using vlc_array_item_at_index
authorFilip Roséen <filip@atch.se>
Mon, 10 Oct 2016 16:18:02 +0000 (18:18 +0200)
committerThomas Guillem <thomas@gllm.fr>
Mon, 10 Oct 2016 16:41:42 +0000 (18:41 +0200)
vlc_array_item_at_index returns a value of type pointer-to-void,
meaning that the pointer is implicitly convertible to the destination
type (there is no need for the explicit cast).

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/access_output/livehttp.c
modules/mux/asf.c

index 0d520d6..e79fb9f 100644 (file)
@@ -614,7 +614,7 @@ static int updateIndexAndDel( sout_access_out_t *p_access, sout_access_out_sys_t
             //scale to i_index_offset..numsegs + i_index_offset
             uint32_t index = i - i_firstseg + i_index_offset;
 
-            output_segment_t *segment = (output_segment_t *)vlc_array_item_at_index( p_sys->segments_t, index );
+            output_segment_t *segment = vlc_array_item_at_index( p_sys->segments_t, index );
             if( p_sys->key_uri &&
                 ( !psz_current_uri ||  strcmp( psz_current_uri, segment->psz_key_uri ) )
               )
@@ -714,7 +714,7 @@ static void closeCurrentSegment( sout_access_out_t *p_access, sout_access_out_sy
 {
     if ( p_sys->i_handle >= 0 )
     {
-        output_segment_t *segment = (output_segment_t *)vlc_array_item_at_index( p_sys->segments_t, vlc_array_count( p_sys->segments_t ) - 1 );
+        output_segment_t *segment = vlc_array_item_at_index( p_sys->segments_t, vlc_array_count( p_sys->segments_t ) - 1 );
 
         if( p_sys->key_uri )
         {
index f4affbe..90a67e3 100644 (file)
@@ -279,7 +279,7 @@ static void Close( vlc_object_t * p_this )
 
     for( int i = 0; i < vlc_array_count( p_sys->p_tracks ); i++ )
     {
-        asf_track_t *track = (asf_track_t *)vlc_array_item_at_index( p_sys->p_tracks, i );
+        asf_track_t *track = vlc_array_item_at_index( p_sys->p_tracks, i );
         free( track->p_extra );
         es_format_Clean( &track->fmt );
         free( track );