diff options
author | monty@donna.mysql.com <> | 2000-09-22 01:46:26 +0300 |
---|---|---|
committer | monty@donna.mysql.com <> | 2000-09-22 01:46:26 +0300 |
commit | 50486eeb807aefb8af2e03636544fd167ded7f00 (patch) | |
tree | 578e79cb989b0a5458b2f7b7cd27600813a79432 /mysys/thr_mutex.c | |
parent | 13b3c3280e6bf25be2b5222022a8e22fd7e774c3 (diff) | |
download | mariadb-git-50486eeb807aefb8af2e03636544fd167ded7f00.tar.gz |
Fixes for MyISAM and packed keys + AIX
Diffstat (limited to 'mysys/thr_mutex.c')
-rw-r--r-- | mysys/thr_mutex.c | 9 |
1 files changed, 5 insertions, 4 deletions
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; } |