mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-02 20:53:06 +08:00
merge from gcc
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2009-05-29 Michael Matz <matz@suse.de>
|
||||||
|
|
||||||
|
* fibheap.c (fibheap_replace_key_data): Make sure we don't early
|
||||||
|
out when forcing the minimum.
|
||||||
|
(fibheap_delete_node): Assert that we managed to force the minimum.
|
||||||
|
|
||||||
2009-05-25 Tristan Gingold <gingold@adacore.com>
|
2009-05-25 Tristan Gingold <gingold@adacore.com>
|
||||||
|
|
||||||
* config.h-vms: Rewritten. Define configure macros.
|
* config.h-vms: Rewritten. Define configure macros.
|
||||||
|
@ -214,7 +214,10 @@ fibheap_replace_key_data (fibheap_t heap, fibnode_t node,
|
|||||||
node->key = key;
|
node->key = key;
|
||||||
y = node->parent;
|
y = node->parent;
|
||||||
|
|
||||||
if (okey == key)
|
/* Short-circuit if the key is the same, as we then don't have to
|
||||||
|
do anything. Except if we're trying to force the new node to
|
||||||
|
be the new minimum for delete. */
|
||||||
|
if (okey == key && okey != FIBHEAPKEY_MIN)
|
||||||
return odata;
|
return odata;
|
||||||
|
|
||||||
/* These two compares are specifically <= 0 to make sure that in the case
|
/* These two compares are specifically <= 0 to make sure that in the case
|
||||||
@ -256,6 +259,11 @@ fibheap_delete_node (fibheap_t heap, fibnode_t node)
|
|||||||
|
|
||||||
/* To perform delete, we just make it the min key, and extract. */
|
/* To perform delete, we just make it the min key, and extract. */
|
||||||
fibheap_replace_key (heap, node, FIBHEAPKEY_MIN);
|
fibheap_replace_key (heap, node, FIBHEAPKEY_MIN);
|
||||||
|
if (node != heap->min)
|
||||||
|
{
|
||||||
|
fprintf (stderr, "Can't force minimum on fibheap.\n");
|
||||||
|
abort ();
|
||||||
|
}
|
||||||
fibheap_extract_min (heap);
|
fibheap_extract_min (heap);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Reference in New Issue
Block a user