bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] fix typo in lib/lock.c (fixes compilation on Darwin)


From: Paolo Bonzini
Subject: [PATCH] fix typo in lib/lock.c (fixes compilation on Darwin)
Date: Thu, 07 Aug 2008 12:09:56 +0200
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

glthread_recursive_lock_init_multithreaded has a typo that makes it not compile on Darwin. Fixed thusly (but the code for recursive locks seems half-cooked, as the two branches of the #if have the same code).

Paolo

2008-08-07  Paolo Bonzini  <address@hidden>

        * lib/lock.c (glthread_recursive_lock_init_multithreaded)
        [!PTHREAD_RECURSIVE_MUTEX_INITIALIZER]: Fix typo.


diff --git a/lib/lock.c b/lib/lock.c
index 709da69..4d97fa4 100644
--- a/lib/lock.c
+++ b/lib/lock.c
@@ -372,7 +372,7 @@ glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
     }
   err = pthread_mutexattr_destroy (&attributes);
   if (err != 0)
-    return ret;
+    return err;
   lock->initialized = 1;
   return 0;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]