Fix sense of test of lock call preparing to update debug info in
authorKen Raeburn <raeburn@mit.edu>
Mon, 25 Aug 2008 17:40:58 +0000 (17:40 +0000)
committerKen Raeburn <raeburn@mit.edu>
Mon, 25 Aug 2008 17:40:58 +0000 (17:40 +0000)
k5_mutex_destroy.
Thanks, Ezra.

ticket: 6090

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20690 dc483132-0cff-0310-8789-dd5450dbe970

src/include/k5-thread.h

index dbc1a6fd71a05ef57ddd739f6082d4c32ac42520..e8f2c995779793ca36e98350753cac1c79dde4f5 100644 (file)
@@ -693,7 +693,7 @@ static inline int k5_mutex_finish_init_1(k5_mutex_t *m, k5_debug_loc l)
 #define k5_mutex_destroy(M)                    \
        (k5_os_mutex_assert_unlocked(&(M)->os), \
         krb5int_mutex_report_stats(M),         \
-        k5_mutex_lock(M) && ((M)->loc_last = K5_DEBUG_LOC, k5_mutex_unlock(M)), \
+        !k5_mutex_lock(M) && ((M)->loc_last = K5_DEBUG_LOC, k5_mutex_unlock(M)), \
         k5_os_mutex_destroy(&(M)->os))
 
 #if __GNUC__ >= 4