[vlc-devel] commit: Use calloc instead of malloc+memset. ( Rémi Duraffort )
git version control
git at videolan.org
Fri Dec 12 22:17:06 CET 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Dec 12 20:35:19 2008 +0100| [b03e7b4e12831e1fe2f4a3ee69b1985837dcb0a1] | committer: Rémi Duraffort
Use calloc instead of malloc+memset.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b03e7b4e12831e1fe2f4a3ee69b1985837dcb0a1
---
src/audio_output/dec.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 70af428..a3fe900 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -85,10 +85,9 @@ static aout_input_t * DecNew( vlc_object_t * p_this, aout_instance_t * p_aout,
goto error;
}
- p_input = malloc(sizeof(aout_input_t));
- if( p_input == NULL )
+ p_input = calloc( 1, sizeof(aout_input_t));
+ if( !p_input )
goto error;
- memset( p_input, 0, sizeof(aout_input_t) );
vlc_mutex_init( &p_input->lock );
More information about the vlc-devel
mailing list