summaryrefslogtreecommitdiff
path: root/shmem
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-05-27 15:49:59 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-05-27 15:49:59 +0000
commit5d27abb736f64f02cb8d51335599a52addb18558 (patch)
tree24a976a3851dee2224b11b07e8f32a5a507dd70d /shmem
parent228544c3a84110c11fe32c8c04d5f56bf442dac6 (diff)
downloadlibapr-5d27abb736f64f02cb8d51335599a52addb18558.tar.gz
* shmem/unix/shm.c (shm_cleanup_owner): Simplify error handling.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65133 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r--shmem/unix/shm.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/shmem/unix/shm.c b/shmem/unix/shm.c
index 655fca989..826252438 100644
--- a/shmem/unix/shm.c
+++ b/shmem/unix/shm.c
@@ -45,16 +45,10 @@ static apr_status_t shm_cleanup_owner(void *m_)
/* name-based shared memory */
else {
#if APR_USE_SHMEM_MMAP_TMP
- apr_status_t rv;
-
if (munmap(m->base, m->realsize) == -1) {
return errno;
}
- rv = apr_file_remove(m->filename, m->pool);
- if (rv != APR_SUCCESS) {
- return rv;
- }
- return APR_SUCCESS;
+ return apr_file_remove(m->filename, m->pool);
#endif
#if APR_USE_SHMEM_MMAP_SHM
if (munmap(m->base, m->realsize) == -1) {
@@ -66,8 +60,6 @@ static apr_status_t shm_cleanup_owner(void *m_)
return APR_SUCCESS;
#endif
#if APR_USE_SHMEM_SHMGET
- apr_status_t rv;
-
/* Indicate that the segment is to be destroyed as soon
* as all processes have detached. This also disallows any
* new attachments to the segment. */
@@ -77,11 +69,7 @@ static apr_status_t shm_cleanup_owner(void *m_)
if (shmdt(m->base) == -1) {
return errno;
}
- rv = apr_file_remove(m->filename, m->pool);
- if (rv != APR_SUCCESS) {
- return rv;
- }
- return APR_SUCCESS;
+ return apr_file_remove(m->filename, m->pool);
#endif
}