Use the first empty slot in the open cache table, so scan doesn't (usu

ally) have to look through the entire table.
This commit is contained in:
Mark Valence 2000-06-15 17:48:16 +00:00
parent 1ae21d00f1
commit 93a622d5e1

View file

@ -62,7 +62,8 @@ ldbm_cache_open(
for ( i = 0; i < MAXDBCACHE; i++ ) {
/* see if this slot is free */
if ( li->li_dbcache[i].dbc_name == NULL) {
empty = i;
if (empty == MAXDBCACHE)
empty = i;
continue;
}