Commit 93a622d5 authored by Mark Valence's avatar Mark Valence
Browse files

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

ally) have to look through the entire table.
parent 1ae21d00
......@@ -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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment