diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2002-04-16 20:25:57 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2002-04-16 20:25:57 +0000 |
commit | f84c01947d030554a60c397ca6d77bdd33475993 (patch) | |
tree | df52eada4549d124ff2dd1534d358de4be940d52 | |
parent | 63f381d9ef37c7170d8bd6aeea674d2f30639a25 (diff) | |
download | libapr-f84c01947d030554a60c397ca6d77bdd33475993.tar.gz |
standardize some apr_foo_close() functions (call apr_pool_cleanup_run())
a couple of these functions didn't kill the cleanup if it failed; we might
as well; the error isn't going to magically disappear next time we try
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63272 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | i18n/unix/xlate.c | 8 | ||||
-rw-r--r-- | mmap/unix/mmap.c | 8 | ||||
-rw-r--r-- | network_io/unix/sockets.c | 3 | ||||
-rw-r--r-- | shmem/unix/shm.c | 4 |
4 files changed, 4 insertions, 19 deletions
diff --git a/i18n/unix/xlate.c b/i18n/unix/xlate.c index c403838a7..7d1a61cb9 100644 --- a/i18n/unix/xlate.c +++ b/i18n/unix/xlate.c @@ -357,13 +357,7 @@ apr_int32_t apr_xlate_conv_byte(apr_xlate_t *convset, unsigned char inchar) apr_status_t apr_xlate_close(apr_xlate_t *convset) { - apr_status_t status; - - if ((status = apr_xlate_cleanup(convset)) == APR_SUCCESS) { - apr_pool_cleanup_kill(convset->pool, convset, apr_xlate_cleanup); - } - - return status; + return apr_pool_cleanup_run(convset->pool, convset, apr_xlate_cleanup); } #endif /* APR_HAS_XLATE */ diff --git a/mmap/unix/mmap.c b/mmap/unix/mmap.c index 3f081308e..4a54b860e 100644 --- a/mmap/unix/mmap.c +++ b/mmap/unix/mmap.c @@ -199,13 +199,7 @@ APR_DECLARE(apr_status_t) apr_mmap_dup(apr_mmap_t **new_mmap, APR_DECLARE(apr_status_t) apr_mmap_delete(apr_mmap_t *mm) { - apr_status_t rv; - - if ((rv = mmap_cleanup(mm)) == APR_SUCCESS) { - apr_pool_cleanup_kill(mm->cntxt, mm, mmap_cleanup); - return APR_SUCCESS; - } - return rv; + return apr_pool_cleanup_run(mm->cntxt, mm, mmap_cleanup); } #endif diff --git a/network_io/unix/sockets.c b/network_io/unix/sockets.c index aa3cccce0..38426be88 100644 --- a/network_io/unix/sockets.c +++ b/network_io/unix/sockets.c @@ -149,8 +149,7 @@ apr_status_t apr_shutdown(apr_socket_t *thesocket, apr_shutdown_how_e how) apr_status_t apr_socket_close(apr_socket_t *thesocket) { - apr_pool_cleanup_kill(thesocket->cntxt, thesocket, socket_cleanup); - return socket_cleanup(thesocket); + return apr_pool_cleanup_run(thesocket->cntxt, thesocket, socket_cleanup); } apr_status_t apr_bind(apr_socket_t *sock, apr_sockaddr_t *sa) diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c index 6c41dd59a..a190ef5ca 100644 --- a/shmem/unix/shm.c +++ b/shmem/unix/shm.c @@ -418,9 +418,7 @@ APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m, APR_DECLARE(apr_status_t) apr_shm_destroy(apr_shm_t *m) { - apr_status_t rv = shm_cleanup_owner(m); - apr_pool_cleanup_kill(m->pool, m, shm_cleanup_owner); - return rv; + return apr_pool_cleanup_run(m->pool, m, shm_cleanup_owner); } static apr_status_t shm_cleanup_attach(void *m_) |