wrowe 01/05/13 10:29:43
Modified: dbm/sdbm sdbm.c
Log:
Dropped a significant little bit of code and had the wrong sequencing
in apr_sdbm_firstkey() ... seems a rememnant of the old code.
Thanks to Greg Stein for noting this descrepancy.
Revision Changes Path
1.22 +8 -2 apr-util/dbm/sdbm/sdbm.c
Index: sdbm.c
===================================================================
RCS file: /home/cvs/apr-util/dbm/sdbm/sdbm.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- sdbm.c 2001/05/09 19:12:38 1.21
+++ sdbm.c 2001/05/13 17:29:41 1.22
@@ -464,11 +464,17 @@
/*
* start at page 0
*/
- status = read_from(db->pagf, db->pagbuf, OFF_PAG(0), PBLKSIZ);
+ if ((status = read_from(db->pagf, db->pagbuf, OFF_PAG(0), PBLKSIZ))
+ == APR_SUCCESS) {
+ db->pagbno = 0;
+ db->blkptr = 0;
+ db->keyptr = 0;
+ status = getnext(key, db);
+ }
(void) apr_sdbm_unlock(db);
- return getnext(key, db);
+ return status;
}
APU_DECLARE(apr_status_t) apr_sdbm_nextkey(apr_sdbm_t *db,