diff options
author | Joe Orton <jorton@apache.org> | 2004-05-27 15:49:59 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2004-05-27 15:49:59 +0000 |
commit | e869e0ec325e51d037dd16ff8ff1af022f014c92 (patch) | |
tree | 24a976a3851dee2224b11b07e8f32a5a507dd70d /shmem | |
parent | 4f57008f676123d9cf2d1cc4b29fa63e6cec3b9b (diff) | |
download | apr-e869e0ec325e51d037dd16ff8ff1af022f014c92.tar.gz |
* shmem/unix/shm.c (shm_cleanup_owner): Simplify error handling.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65133 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/unix/shm.c | 16 |
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 } |