[vlc-commits] real: remove redundant casts

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


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

real: remove redundant casts

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

 modules/access/rtsp/real.c |  2 +-
 modules/demux/real.c       | 12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/access/rtsp/real.c b/modules/access/rtsp/real.c
index 6d256286fe..9c8d8d6316 100644
--- a/modules/access/rtsp/real.c
+++ b/modules/access/rtsp/real.c
@@ -432,7 +432,7 @@ static rmff_header_t *real_parse_sdp(access_t *p_access, char *data, char **stre
   desc=sdpplin_parse(p_access, data);
   if( !desc ) return NULL;
 
-  buf= (char *)malloc(MLTI_BUF_MAX_SIZE);
+  buf = malloc(MLTI_BUF_MAX_SIZE);
   if( !buf ) goto error;
 
   header = calloc( 1, sizeof(rmff_header_t) );
diff --git a/modules/demux/real.c b/modules/demux/real.c
index fec8beb885..b4bf48a846 100644
--- a/modules/demux/real.c
+++ b/modules/demux/real.c
@@ -388,7 +388,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 * );
 
             /* read stream size maybe failed in rtsp streaming, 
                so use duration to determin the position at first  */
@@ -409,7 +409,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_SUCCESS;
 
         case DEMUX_GET_TIME:
-            pi64 = (int64_t*)va_arg( args, int64_t * );
+            pi64 = va_arg( args, int64_t * );
 
             if( p_sys->i_our_duration > 0 )
             {
@@ -429,7 +429,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             return VLC_EGENERIC;
 
         case DEMUX_SET_POSITION:
-            f = (double) va_arg( args, double );
+            f = va_arg( args, double );
             i64 = (int64_t) ( stream_Size( p_demux->s ) * f );
 
             if( !p_sys->p_index && i64 != 0 )
@@ -452,11 +452,11 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
             if( !p_sys->p_index )
                 return VLC_EGENERIC;
 
-            i64 = (int64_t) va_arg( args, int64_t );
+            i64 = va_arg( args, int64_t );
             return ControlSeekTime( p_demux, i64 );
 
         case DEMUX_GET_LENGTH:
-            pi64 = (int64_t*)va_arg( args, int64_t * );
+            pi64 = va_arg( args, int64_t * );
  
             if( p_sys->i_our_duration <= 0 )
             {
@@ -470,7 +470,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
 
         case DEMUX_GET_META:
         {
-            vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t* );
+            vlc_meta_t *p_meta = va_arg( args, vlc_meta_t * );
 
             /* the core will crash if we provide NULL strings, so check
              * every string first */



More information about the vlc-commits mailing list