From 36d62b40229738ff1bcc1ced472cc06a2e25c686 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 21 Jan 2008 16:15:41 +0000 Subject: [PATCH] Remove useless mutex (pthread_once is enough) --- libs/srtp/srtp.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/libs/srtp/srtp.c b/libs/srtp/srtp.c index 60c07b6f72..e6d09c9732 100644 --- a/libs/srtp/srtp.c +++ b/libs/srtp/srtp.c @@ -106,10 +106,8 @@ static int init_libgcrypt (void) { int retval; #ifndef WIN32 - static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_once_t once = PTHREAD_ONCE_INIT; - pthread_mutex_lock (&mutex); pthread_once (&once, initonce_libgcrypt); #else # warning FIXME: This is not thread-safe. @@ -119,10 +117,6 @@ static int init_libgcrypt (void) retval = libgcrypt_usable ? 0 : -1; -#ifndef WIN32 - pthread_mutex_unlock (&mutex); -#endif - return retval; } -- 2.39.2