[multiple] use splaytree_insert_splayed()

This commit is contained in:
Glenn Strauss 2023-09-11 12:49:21 -04:00
parent 0523c65ad8
commit b0369b0dbd
3 changed files with 5 additions and 5 deletions

View File

@ -142,7 +142,7 @@ http_auth_cache_insert (splay_tree ** const sptree, const int ndx, void * const
* and splaytree has not been modified since http_auth_cache_query())*/
/* *sptree = splaytree_splay(*sptree, ndx); */
if (NULL == *sptree || (*sptree)->key != ndx)
*sptree = splaytree_insert(*sptree, ndx, data);
*sptree = splaytree_insert_splayed(*sptree, ndx, data);
else { /* collision; replace old entry */
data_free_fn((*sptree)->data);
(*sptree)->data = data;

View File

@ -118,7 +118,7 @@ mod_vhostdb_cache_insert (request_st * const r, plugin_data * const p, vhostdb_c
* and splaytree has not been modified since mod_vhostdb_cache_query())*/
/* *sptree = splaytree_splay(*sptree, ndx); */
if (NULL == *sptree || (*sptree)->key != ndx)
*sptree = splaytree_insert(*sptree, ndx, ve);
*sptree = splaytree_insert_splayed(*sptree, ndx, ve);
else { /* collision; replace old entry */
vhostdb_cache_entry_free((*sptree)->data);
(*sptree)->data = ve;

View File

@ -736,7 +736,7 @@ static fam_dir_entry * fam_dir_monitor(stat_cache_fam *scf, char *fn, uint32_t d
fam_dir->st_dev = st->st_dev;
fam_dir->st_ino = st->st_ino;
#ifdef HAVE_SYS_INOTIFY_H
scf->wds = splaytree_insert(scf->wds, fam_dir->req, fam_dir);
scf->wds = splaytree_insert_splayed(scf->wds,fam_dir->req,fam_dir);
#endif
}
fam_dir->stat_ts = cur_ts;
@ -761,7 +761,7 @@ static fam_dir_entry * fam_dir_monitor(stat_cache_fam *scf, char *fn, uint32_t d
return NULL;
}
scf->dirs = splaytree_insert(scf->dirs, dir_ndx, fam_dir);
scf->dirs = splaytree_insert_splayed(scf->dirs, dir_ndx, fam_dir);
#ifdef HAVE_SYS_INOTIFY_H
scf->wds = splaytree_insert(scf->wds, fam_dir->req, fam_dir);
#endif
@ -1298,7 +1298,7 @@ static stat_cache_entry * stat_cache_refresh_entry(const buffer * const name, ui
sptree->data = sce;
}
else
/*sptree =*/ sc.files = splaytree_insert(sptree, file_ndx, sce);
sc.files = splaytree_insert_splayed(sptree, file_ndx, sce);
}
else {
buffer_clear(&sce->etag);