[vlc-commits] dvdread: remove redundant casts

Rémi Denis-Courmont git at videolan.org
Wed Apr 19 19:48:36 CEST 2017


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 19 20:23:26 2017 +0300| [984b5d425653851f557703c6d847ecde3f0e954b] | committer: Rémi Denis-Courmont

dvdread: remove redundant casts

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=984b5d425653851f557703c6d847ecde3f0e954b
---

 modules/access/dvdread.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/modules/access/dvdread.c b/modules/access/dvdread.c
index 83208fb972..d18dda1f20 100644
--- a/modules/access/dvdread.c
+++ b/modules/access/dvdread.c
@@ -333,7 +333,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
     {
         case DEMUX_GET_POSITION:
         {
-            pf = (double*) va_arg( args, double* );
+            pf = va_arg( args, double * );
 
             if( p_sys->i_title_blocks > 0 )
                 *pf = (double)p_sys->i_title_offset / p_sys->i_title_blocks;
@@ -344,14 +344,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         }
         case DEMUX_SET_POSITION:
         {
-            f = (double)va_arg( args, double );
+            f = va_arg( args, double );
 
             DvdReadSeek( p_demux, f * p_sys->i_title_blocks );
 
             return VLC_SUCCESS;
         }
         case DEMUX_GET_TIME:
-            pi64 = (int64_t*)va_arg( args, int64_t * );
+            pi64 = va_arg( args, int64_t * );
             if( p_demux->info.i_title >= 0 && p_demux->info.i_title < p_sys->i_titles )
             {
                 *pi64 = (int64_t) dvdtime_to_time( &p_sys->p_cur_pgc->playback_time, 0 ) /
@@ -362,7 +362,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_EGENERIC;
 
         case DEMUX_GET_LENGTH:
-            pi64 = (int64_t*)va_arg( args, int64_t * );
+            pi64 = va_arg( args, int64_t * );
             if( p_demux->info.i_title >= 0 && p_demux->info.i_title < p_sys->i_titles )
             {
                 *pi64 = (int64_t)dvdtime_to_time( &p_sys->p_cur_pgc->playback_time, 0 );
@@ -376,7 +376,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
         case DEMUX_CAN_SEEK:
         case DEMUX_CAN_CONTROL_PACE:
             /* TODO */
-            pb = (bool*)va_arg( args, bool * );
+            pb = va_arg( args, bool * );
             *pb = true;
             return VLC_SUCCESS;
 
@@ -384,10 +384,10 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_GET_TITLE_INFO:
-            ppp_title = (input_title_t***)va_arg( args, input_title_t*** );
-            pi_int    = (int*)va_arg( args, int* );
-            *((int*)va_arg( args, int* )) = 1; /* Title offset */
-            *((int*)va_arg( args, int* )) = 1; /* Chapter offset */
+            ppp_title = va_arg( args, input_title_t *** );
+            pi_int    = va_arg( args, int * );
+            *va_arg( args, int * ) = 1; /* Title offset */
+            *va_arg( args, int * ) = 1; /* Chapter offset */
 
             /* Duplicate title infos */
             *pi_int = p_sys->i_titles;
@@ -399,7 +399,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_SET_TITLE:
-            i = (int)va_arg( args, int );
+            i = va_arg( args, int );
             if( DvdReadSetArea( p_demux, i, 0, -1 ) != VLC_SUCCESS )
             {
                 msg_Warn( p_demux, "cannot set title/chapter" );
@@ -412,7 +412,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_SET_SEEKPOINT:
-            i = (int)va_arg( args, int );
+            i = va_arg( args, int );
             if( DvdReadSetArea( p_demux, -1, i, -1 ) != VLC_SUCCESS )
             {
                 msg_Warn( p_demux, "cannot set title/chapter" );
@@ -423,7 +423,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_GET_PTS_DELAY:
-            pi64 = (int64_t*)va_arg( args, int64_t * );
+            pi64 = va_arg( args, int64_t * );
             *pi64 =
                 INT64_C(1000) * var_InheritInteger( p_demux, "disc-caching" );
             return VLC_SUCCESS;



More information about the vlc-commits mailing list