[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apr-cvs
Subject:    cvs commit: apr/shmem/unix shm.c
From:       jorton () apache ! org
Date:       2004-05-27 15:49:59
Message-ID: 20040527154959.8988.qmail () minotaur ! apache ! org
[Download RAW message or body]

jorton      2004/05/27 08:49:59

  Modified:    shmem/unix shm.c
  Log:
  * shmem/unix/shm.c (shm_cleanup_owner): Simplify error handling.
  
  Revision  Changes    Path
  1.24      +2 -14     apr/shmem/unix/shm.c
  
  Index: shm.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/unix/shm.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -d -u -r1.23 -r1.24
  --- shm.c	13 Feb 2004 09:38:34 -0000	1.23
  +++ shm.c	27 May 2004 15:49:59 -0000	1.24
  @@ -45,16 +45,10 @@
       /* 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 @@
           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 @@
           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
       }
   
  
  
  
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic