apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/shmem/unix shm.c
Date Thu, 27 May 2004 15:52:46 GMT
jorton      2004/05/27 08:52:46

  Modified:    shmem/unix shm.c
  Log:
  * shmem/unix/shm.c (apr_shm_attach): Remove palloc->ENOMEM checking.
  
  Revision  Changes    Path
  1.25      +0 -15     apr/shmem/unix/shm.c
  
  Index: shm.c
  ===================================================================
  RCS file: /home/cvs/apr/shmem/unix/shm.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -d -u -r1.24 -r1.25
  --- shm.c	27 May 2004 15:49:59 -0000	1.24
  +++ shm.c	27 May 2004 15:52:46 -0000	1.25
  @@ -105,9 +105,6 @@
       if (filename == NULL) {
   #if APR_USE_SHMEM_MMAP_ZERO || APR_USE_SHMEM_MMAP_ANON
           new_m = apr_palloc(pool, sizeof(apr_shm_t));
  -        if (!new_m) {
  -            return APR_ENOMEM;
  -        }
           new_m->pool = pool;
           new_m->reqsize = reqsize;
           new_m->realsize = reqsize + 
  @@ -168,9 +165,6 @@
   #if APR_USE_SHMEM_SHMGET_ANON
   
           new_m = apr_palloc(pool, sizeof(apr_shm_t));
  -        if (!new_m) {
  -            return APR_ENOMEM;
  -        }
           new_m->pool = pool;
           new_m->reqsize = reqsize;
           new_m->realsize = reqsize;
  @@ -216,9 +210,6 @@
       /* Name-based shared memory */
       else {
           new_m = apr_palloc(pool, sizeof(apr_shm_t));
  -        if (!new_m) {
  -            return APR_ENOMEM;
  -        }
           new_m->pool = pool;
           new_m->reqsize = reqsize;
           new_m->filename = apr_pstrdup(pool, filename);
  @@ -414,9 +405,6 @@
           apr_size_t nbytes;
   
           new_m = apr_palloc(pool, sizeof(apr_shm_t));
  -        if (!new_m) {
  -            return APR_ENOMEM;
  -        }
           new_m->pool = pool;
           new_m->filename = apr_pstrdup(pool, filename);
   
  @@ -473,9 +461,6 @@
           key_t shmkey;
   
           new_m = apr_palloc(pool, sizeof(apr_shm_t));
  -        if (!new_m) {
  -            return APR_ENOMEM;
  -        }
   
           /* FIXME: does APR_OS_DEFAULT matter for reading? */
           status = apr_file_open(&file, filename, 
  
  
  

Mime
View raw message