]> git.sesse.net Git - vlc/blobdiff - modules/mux/mpeg/csa.c
TS mux: use var_* helpers
[vlc] / modules / mux / mpeg / csa.c
index 9550297473671bf4dc0a0572cf9f193e486fb302..b1381a8fa8bc11c016f31e7de791b6eb0cb1c8cb 100644 (file)
@@ -2,7 +2,7 @@
  * libcsa.c: CSA scrambler/descrambler
  *****************************************************************************
  * Copyright (C) 2004-2005 Laurent Aimar
- * $Id$
+ * Copyright (C) the deCSA authors
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Jean-Paul Saman <jpsaman #_at_# m2x.nl>
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-/*
- * XXX: A great part is just a copy/past of deCSA but I can't find the
- * author and the license. If there is a problem with it please e-mail me.
- */
-
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
@@ -66,16 +61,13 @@ static void csa_BlockCypher( uint8_t kk[57], uint8_t bd[8], uint8_t ib[8] );
  *****************************************************************************/
 csa_t *csa_New( void )
 {
-    csa_t *c = malloc( sizeof( csa_t ) );
-    memset( c, 0, sizeof( csa_t ) );
-
-    return c;
+    return calloc( 1, sizeof( csa_t ) );
 }
 
 /*****************************************************************************
  * csa_Delete:
  *****************************************************************************/
-void   csa_Delete( csa_t *c )
+void csa_Delete( csa_t *c )
 {
     free( c );
 }
@@ -102,11 +94,7 @@ int csa_SetCW( vlc_object_t *p_caller, csa_t *c, char *psz_ck, bool set_odd )
     }
     else
     {
-#ifndef UNDER_CE
         uint64_t i_ck = strtoull( psz_ck, NULL, 16 );
-#else
-        uint64_t i_ck = strtoll( psz_ck, NULL, 16 );
-#endif
         uint8_t  ck[8];
         int      i;