diff options
author | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2003-06-08 13:36:32 +0000 |
---|---|---|
committer | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2003-06-08 13:36:32 +0000 |
commit | 053047ba767801714f129c716c57b1e320df486b (patch) | |
tree | dcda6f0616e469e3ec6dbdd8764ff5b39440fb31 /locks | |
parent | 0668c97690d5959f6d0d1a894904c778ec869b77 (diff) | |
download | libapr-053047ba767801714f129c716c57b1e320df486b.tar.gz |
Code style cleanups: remove unnecessary casts to and from void *;
don't check for allocation failure.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64533 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r-- | locks/unix/thread_mutex.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/locks/unix/thread_mutex.c b/locks/unix/thread_mutex.c index ba0140821..130a5cb98 100644 --- a/locks/unix/thread_mutex.c +++ b/locks/unix/thread_mutex.c @@ -60,7 +60,7 @@ static apr_status_t thread_mutex_cleanup(void *data) { - apr_thread_mutex_t *mutex = (apr_thread_mutex_t *)data; + apr_thread_mutex_t *mutex = data; apr_status_t rv; rv = pthread_mutex_destroy(&mutex->mutex); @@ -79,12 +79,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex, apr_thread_mutex_t *new_mutex; apr_status_t rv; - new_mutex = (apr_thread_mutex_t *)apr_pcalloc(pool, - sizeof(apr_thread_mutex_t)); - - if (new_mutex == NULL) { - return APR_ENOMEM; - } + new_mutex = apr_pcalloc(pool, sizeof(apr_thread_mutex_t)); new_mutex->pool = pool; @@ -102,7 +97,7 @@ APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex, } apr_pool_cleanup_register(new_mutex->pool, - (void *)new_mutex, thread_mutex_cleanup, + new_mutex, thread_mutex_cleanup, apr_pool_cleanup_null); *mutex = new_mutex; |