diff options
author | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-30 17:00:51 +0000 |
---|---|---|
committer | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-10-30 17:00:51 +0000 |
commit | f324afe5775f0147e02256bc13545896f6217145 (patch) | |
tree | 4eea71b89b95bd7e69eeea0bad32519df9cb1f8c /libiberty/hashtab.c | |
parent | 2e555bbe2e2b781c3790fa471f4e5bf744c5f7d8 (diff) | |
download | gcc-f324afe5775f0147e02256bc13545896f6217145.tar.gz |
* hashtab.c (htab_find_slot_with_hash): Decrease n_deleted
instead of increasing n_elements when inserting to deleted slot.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73090 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty/hashtab.c')
-rw-r--r-- | libiberty/hashtab.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index cbf82592be1..231fbc0dd7a 100644 --- a/libiberty/hashtab.c +++ b/libiberty/hashtab.c @@ -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]; } |