Skip to content
Snippets Groups Projects
Commit f7db076c authored by Howard Chu's avatar Howard Chu
Browse files

Fix prev commit

parent 7dcb7915
Branches
Tags
No related merge requests found
......@@ -62,7 +62,7 @@ bdb_db_cache(
*dbout = NULL;
for( i=BDB_NDB; i < BDB_INDICES && bdb->bi_databases[i]; i++ ) {
for( i=BDB_NDB; i < bdb->bi_ndatabases; i++ ) {
if( !strcmp( bdb->bi_databases[i]->bdi_name, name) ) {
*dbout = bdb->bi_databases[i]->bdi_db;
return 0;
......@@ -86,7 +86,7 @@ bdb_db_cache(
if (rc) return rc;
/* check again! may have been added by another thread */
for( i=BDB_NDB; i < BDB_INDICES && bdb->bi_databases[i]; i++ ) {
for( i=BDB_NDB; i < bdb->bi_ndatabases; i++ ) {
if( !strcmp( bdb->bi_databases[i]->bdi_name, name) ) {
*dbout = bdb->bi_databases[i]->bdi_db;
LOCK_PUT( bdb->bi_dbenv, &lock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment