* addrmap.c (addrmap_splay_tree_remove): New function.

(addrmap_mutable_set_empty): Use it.
This commit is contained in:
Jim Blandy 2007-12-06 23:37:35 +00:00
parent f4f7091ffe
commit cb446409e6
2 changed files with 11 additions and 1 deletions

View file

@ -252,6 +252,13 @@ addrmap_splay_tree_successor (struct addrmap_mutable *map, CORE_ADDR addr)
}
static void
addrmap_splay_tree_remove (struct addrmap_mutable *map, CORE_ADDR addr)
{
splay_tree_remove (map->tree, (splay_tree_key) &addr);
}
static CORE_ADDR
addrmap_node_key (splay_tree_node node)
{
@ -347,7 +354,7 @@ addrmap_mutable_set_empty (struct addrmap *this,
{
next = addrmap_splay_tree_successor (map, addrmap_node_key (n));
if (addrmap_node_value (n) == prior_value)
splay_tree_remove (map->tree, addrmap_node_key (n));
addrmap_splay_tree_remove (map, addrmap_node_key (n));
else
prior_value = addrmap_node_value (n);
}