]> git.sesse.net Git - vlc/blobdiff - modules/codec/vorbis.c
Use calloc when applicable (decoders).
[vlc] / modules / codec / vorbis.c
index 33e8a7d0ded7d65888efaec7e5b32d30144be4b5..5d25be9d51b09abfd8c74d80738499710c0c7a2b 100644 (file)
@@ -235,8 +235,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 */