apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr-util/dbm/sdbm sdbm.c
Date Sun, 06 May 2001 13:21:17 GMT
wrowe       01/05/06 06:21:17

  Modified:    dbm/sdbm sdbm.c
  Log:
    Legibility and code flow cleanup, should have no net effect.
  
  Revision  Changes    Path
  1.20      +13 -29    apr-util/dbm/sdbm/sdbm.c
  
  Index: sdbm.c
  ===================================================================
  RCS file: /home/cvs/apr-util/dbm/sdbm/sdbm.c,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- sdbm.c	2001/05/06 12:58:05	1.19
  +++ sdbm.c	2001/05/06 13:21:17	1.20
  @@ -233,13 +233,10 @@
       apr_status_t status;
       apr_off_t off = OFF_PAG(pagno);
       
  -    if ((status = apr_file_seek(db->pagf, APR_SET, &off)) != APR_SUCCESS ||
  -        (status = apr_file_write_full(db->pagf, buf, PBLKSIZ, NULL)) 
  -                != APR_SUCCESS) {
  -        return status;
  -    }
  -    
  -    return APR_SUCCESS;
  +    if ((status = apr_file_seek(db->pagf, APR_SET, &off)) == APR_SUCCESS)
  +        status = apr_file_write_full(db->pagf, buf, PBLKSIZ, NULL);
  +
  +    return status;
   }
   
   apr_status_t apr_sdbm_delete(apr_sdbm_t *db, const apr_sdbm_datum_t key)
  @@ -259,10 +256,8 @@
           /*
            * update the page file
            */
  -        if ((status = write_page(db, db->pagbuf, db->pagbno)) != APR_SUCCESS)
  -            return status;
  -
  -        return APR_SUCCESS;
  +        status = write_page(db, db->pagbuf, db->pagbno);
  +        return status;
       }
   
       return APR_EACCES;
  @@ -308,13 +303,8 @@
            * and update the page file.
            */
           (void) putpair(db->pagbuf, key, val);
  -
  -        if ((status = write_page(db, db->pagbuf, db->pagbno)) != APR_SUCCESS)
  -            return status;
  -
  -        return APR_SUCCESS;
  -    }
  -    
  +        status = write_page(db, db->pagbuf, db->pagbno);
  +    }    
       return status;
   }
   
  @@ -414,10 +404,8 @@
               memset(buf, 0, len);
               status = APR_SUCCESS;
           }
  -        return status;
       }
  -
  -    return APR_SUCCESS;
  +    return status;
   }
   
   /*
  @@ -431,9 +419,8 @@
        */
       apr_status_t status;
       if ((status = read_from(db->pagf, db->pagbuf, OFF_PAG(0), PBLKSIZ))
  -                != APR_SUCCESS) {
  +                != APR_SUCCESS)
           return status;
  -    }
   
       db->pagbno = 0;
       db->blkptr = 0;
  @@ -540,13 +527,10 @@
           db->maxbno += DBLKSIZ * BYTESIZ;
   
       off = OFF_DIR(dirb);
  -    if (((status = apr_file_seek(db->dirf, APR_SET, &off)) != APR_SUCCESS)
  -        || (status = apr_file_write_full(db->dirf, db->dirbuf, DBLKSIZ,
  -                                   NULL)) != APR_SUCCESS) {
  -        return status;
  -    }
  +    if ((status = apr_file_seek(db->dirf, APR_SET, &off)) == APR_SUCCESS)
  +        status = apr_file_write_full(db->dirf, db->dirbuf, DBLKSIZ, NULL);
   
  -    return APR_SUCCESS;
  +    return status;
   }
   
   /*
  
  
  

Mime
View raw message