mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
hashtab.c (htab_find_slot_with_hash): Decrease n_deleted instead of increasing n_elements when inserting to deleted slot.
* hashtab.c (htab_find_slot_with_hash): Decrease n_deleted instead of increasing n_elements when inserting to deleted slot. From-SVN: r73090
This commit is contained in:
parent
4f1cad002d
commit
e0432c1c14
@ -1,3 +1,8 @@
|
||||
2003-10-30 Josef Zlomek <zlomekj@suse.cz>
|
||||
|
||||
* hashtab.c (htab_find_slot_with_hash): Decrease n_deleted
|
||||
instead of increasing n_elements when inserting to deleted slot.
|
||||
|
||||
2003-10-20 J. Brobecker <brobecker@gnat.com>
|
||||
|
||||
* cplus-dem.c (demangle_template): Register a new Btype only
|
||||
|
@ -535,14 +535,14 @@ htab_find_slot_with_hash (htab, element, hash, insert)
|
||||
if (insert == NO_INSERT)
|
||||
return NULL;
|
||||
|
||||
htab->n_elements++;
|
||||
|
||||
if (first_deleted_slot)
|
||||
{
|
||||
htab->n_deleted--;
|
||||
*first_deleted_slot = EMPTY_ENTRY;
|
||||
return first_deleted_slot;
|
||||
}
|
||||
|
||||
htab->n_elements++;
|
||||
return &htab->entries[index];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user