From 518dc329561a31bc85007c9b20746425efe5febb Mon Sep 17 00:00:00 2001 From: JP Dinger Date: Mon, 25 May 2009 15:15:51 +0200 Subject: [PATCH] Compile fix on windows: vlc_mutex_init() now returns void (corrected). --- include/vlc_gcrypt.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/vlc_gcrypt.h b/include/vlc_gcrypt.h index cd5ffd5457..4d94344ef1 100644 --- a/include/vlc_gcrypt.h +++ b/include/vlc_gcrypt.h @@ -38,18 +38,13 @@ GCRY_THREAD_OPTION_PTHREAD_IMPL; static int gcry_vlc_mutex_init( void **p_sys ) { - int i_val; vlc_mutex_t *p_lock = (vlc_mutex_t *)malloc( sizeof( vlc_mutex_t ) ); - if( p_lock == NULL) return ENOMEM; - i_val = vlc_mutex_init( p_lock ); - if( i_val ) - free( p_lock ); - else - *p_sys = p_lock; - return i_val; + vlc_mutex_init( p_lock ); + *p_sys = p_lock; + return VLC_SUCCESS; } static int gcry_vlc_mutex_destroy( void **p_sys ) -- 2.39.2