apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr-util/misc apr_rmm.c
Date Wed, 07 Jul 2004 17:15:18 GMT
jorton      2004/07/07 10:15:18

  Modified:    misc     apr_rmm.c
  Log:
  * misc/apr_rmm.c (find_block_of_size): Remove redundant conditional.
  (apr_rmm_init, apr_rmm_destroy, apr_rmm_free): Catch some _UNLOCK
  return values.
  
  Revision  Changes    Path
  1.26      +5 -12     apr-util/misc/apr_rmm.c
  
  Index: apr_rmm.c
  ===================================================================
  RCS file: /home/cvs/apr-util/misc/apr_rmm.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -d -w -u -r1.25 -r1.26
  --- apr_rmm.c	7 Jul 2004 17:01:13 -0000	1.25
  +++ apr_rmm.c	7 Jul 2004 17:15:18 -0000	1.26
  @@ -107,13 +107,9 @@
           }
       }
   
  -    if (best) {
           return best;
       }
        
  -    return 0;
  -}
  -
   static void move_block(apr_rmm_t *rmm, apr_rmm_off_t this, int free)
   {   
       struct rmm_block_t *blk = (rmm_block_t*)((char*)rmm->base + this);
  @@ -216,8 +212,7 @@
       blk->prev = 0;
       blk->next = 0;
   
  -    APR_ANYLOCK_UNLOCK(lock);
  -    return APR_SUCCESS;
  +    return APR_ANYLOCK_UNLOCK(lock);
   }
   
   APU_DECLARE(apr_status_t) apr_rmm_destroy(apr_rmm_t *rmm)
  @@ -250,8 +245,7 @@
       rmm->base->abssize = 0;
       rmm->size = 0;
   
  -    APR_ANYLOCK_UNLOCK(&rmm->lock);
  -    return APR_SUCCESS;
  +    return APR_ANYLOCK_UNLOCK(&rmm->lock);
   }
   
   APU_DECLARE(apr_status_t) apr_rmm_attach(apr_rmm_t **rmm, apr_anylock_t *lock,
  @@ -335,7 +329,7 @@
       old = apr_rmm_offset_get(rmm, entity);
   
       if ((this = apr_rmm_malloc(rmm, reqsize)) == 0) {
  -        return this;
  +        return 0;
       }
   
       blk = (rmm_block_t*)((char*)rmm->base + old);
  @@ -393,8 +387,7 @@
        */
       move_block(rmm, this, 1);
       
  -    APR_ANYLOCK_UNLOCK(&rmm->lock);
  -    return APR_SUCCESS;
  +    return APR_ANYLOCK_UNLOCK(&rmm->lock);
   }
   
   APU_DECLARE(void *) apr_rmm_addr_get(apr_rmm_t *rmm, apr_rmm_off_t entity) 
  
  
  

Mime
View raw message