From 50486eeb807aefb8af2e03636544fd167ded7f00 Mon Sep 17 00:00:00 2001 From: "monty@donna.mysql.com" <> Date: Fri, 22 Sep 2000 01:46:26 +0300 Subject: Fixes for MyISAM and packed keys + AIX --- mysys/thr_mutex.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mysys/thr_mutex.c') diff --git a/mysys/thr_mutex.c b/mysys/thr_mutex.c index 149a30a4b24..7cc3b30aaf9 100644 --- a/mysys/thr_mutex.c +++ b/mysys/thr_mutex.c @@ -219,7 +219,7 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line) { - int error; + int error=0; if (mp->count != 0) { fprintf(stderr,"safe_mutex: Trying to destroy a mutex that was locked at %s, line %d at %s, line %d\n", @@ -228,12 +228,13 @@ int safe_mutex_destroy(safe_mutex_t *mp, const char *file, uint line) abort(); } #ifdef __WIN__ - error=0; pthread_mutex_destroy(&mp->global); pthread_mutex_destroy(&mp->mutex); #else - error= (int) (pthread_mutex_destroy(&mp->global) || - pthread_mutex_destroy(&mp->mutex)); + if (pthread_mutex_destroy(&mp->global)) + error=1; + if (pthread_mutex_destroy(&mp->mutex)) + error=1; #endif return error; } -- cgit v1.2.1