[vlc-devel] commit: CSA: simplify and remove scary amd64 warning ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jul 5 20:40:42 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Jul  5 21:42:38 2008 +0300| [c10a4dce37c91443dba16de23bf9a4905c09a50e]

CSA: simplify and remove scary amd64 warning

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

 modules/mux/mpeg/ts.c |   14 ++++----------
 1 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/modules/mux/mpeg/ts.c b/modules/mux/mpeg/ts.c
index d347e7d..6afe0c8 100644
--- a/modules/mux/mpeg/ts.c
+++ b/modules/mux/mpeg/ts.c
@@ -900,20 +900,14 @@ static int ChangeKeyCallback( vlc_object_t *p_this, char const *psz_cmd,
     VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
     sout_mux_t      *p_mux = (sout_mux_t*)p_this;
     sout_mux_sys_t  *p_sys = p_mux->p_sys;
-    int             i_tmp = (int)p_data;
+    int ret;
 
     vlc_mutex_lock( &p_sys->csa_lock );
-    if ( i_tmp )
-    {
-        i_tmp = csa_SetCW( p_this, p_sys->csa, newval.psz_string, true );
-    }
-    else
-    {
-        i_tmp = csa_SetCW( p_this, p_sys->csa, newval.psz_string, false );
-    }
+    ret = csa_SetCW( p_this, p_sys->csa, newval.psz_string,
+                     !!(intptr_t)p_data );
     vlc_mutex_unlock( &p_sys->csa_lock );
 
-    return i_tmp;
+    return ret;
 }
 
 /*****************************************************************************




More information about the vlc-devel mailing list