Fix code that breaks with VC (terrible compiler)

VC2013 still does not properly support placement of variables anywhere
in the scope.  It's a garbage compiler, always will be a garbage
compiler.
This commit is contained in:
jp9000 2014-04-14 14:21:32 -07:00
parent d328d72f0b
commit 81153cb16d

View File

@ -40,10 +40,10 @@ extern "C" {
/* this may seem strange, but you can't use it unless it's an initializer */
static inline void pthread_mutex_init_value(pthread_mutex_t *mutex)
{
pthread_mutex_t init_val = PTHREAD_MUTEX_INITIALIZER;
if (!mutex)
return;
pthread_mutex_t init_val = PTHREAD_MUTEX_INITIALIZER;
*mutex = init_val;
}