[vlc-commits] demux/ty: Control: remove redundant casts

Filip Roséen git at videolan.org
Mon Mar 20 14:36:51 CET 2017


vlc | branch: master | Filip Roséen <filip at atch.se> | Mon Mar 20 14:26:55 2017 +0100| [59ed27760eea74a8b5bcb8bba53e13fbac1b9ee0] | committer: Hugo Beauzée-Luyssen

demux/ty: Control: remove redundant casts

The type yield by va_arg( args, T ) is already guaranteed to be T;
there is no need for the explicit cast.

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/demux/ty.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/demux/ty.c b/modules/demux/ty.c
index 6f9bffa..be82243 100644
--- a/modules/demux/ty.c
+++ b/modules/demux/ty.c
@@ -513,7 +513,7 @@ static int Control(demux_t *p_demux, int i_query, va_list args)
         /* arg is 0.0 - 1.0 percent of overall file position */
         if( ( i64 = p_sys->i_stream_size ) > 0 )
         {
-            pf = (double*) va_arg( args, double* );
+            pf = va_arg( args, double* );
             *pf = ((double)1.0) * vlc_stream_Tell( p_demux->s ) / (double) i64;
             return VLC_SUCCESS;
         }
@@ -528,7 +528,7 @@ static int Control(demux_t *p_demux, int i_query, va_list args)
         return VLC_EGENERIC;
     case DEMUX_GET_TIME:
         /* return TiVo timestamp */
-        p_i64 = (int64_t *) va_arg(args, int64_t *);
+        p_i64 = va_arg(args, int64_t *);
         //*p_i64 = p_sys->lastAudioPTS - p_sys->firstAudioPTS;
         //*p_i64 = (p_sys->l_last_ty_pts / 1000) + (p_sys->lastAudioPTS -
         //    p_sys->l_last_ty_pts_sync);
@@ -536,11 +536,11 @@ static int Control(demux_t *p_demux, int i_query, va_list args)
         return VLC_SUCCESS;
     case DEMUX_GET_LENGTH:    /* length of program in microseconds, 0 if unk */
         /* size / bitrate */
-        p_i64 = (int64_t *) va_arg(args, int64_t *);
+        p_i64 = va_arg(args, int64_t *);
         *p_i64 = 0;
         return VLC_SUCCESS;
     case DEMUX_SET_TIME:      /* arg is time in microsecs */
-        i64 = (int64_t) va_arg( args, int64_t );
+        i64 = va_arg( args, int64_t );
         return ty_stream_seek_time(p_demux, i64 * 1000);
     case DEMUX_GET_FPS:
     default:



More information about the vlc-commits mailing list