]> git.sesse.net Git - vlc/blobdiff - modules/codec/flac.c
Use calloc when applicable (decoders).
[vlc] / modules / codec / flac.c
index 6206360bbeaecef25c770acf7a2fd64ca118ca85..157d9e808c799557b677cb0a680b428b979673cd 100644 (file)
@@ -214,8 +214,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     }
 
     /* Allocate the memory needed to store the decoder's structure */
-    if( ( p_dec->p_sys = p_sys =
-          (decoder_sys_t *)malloc(sizeof(decoder_sys_t)) ) == NULL )
+    if( ( p_dec->p_sys = p_sys = malloc(sizeof(*p_sys)) ) == NULL )
         return VLC_ENOMEM;
 
     /* Misc init */