diff options
author | Josef Zlomek <zlomekj@suse.cz> | 2003-10-30 18:00:51 +0100 |
---|---|---|
committer | Josef Zlomek <zlomek@gcc.gnu.org> | 2003-10-30 17:00:51 +0000 |
commit | e0432c1c143af0e0f6b45d9606e62973373b714d (patch) | |
tree | 4eea71b89b95bd7e69eeea0bad32519df9cb1f8c /libiberty/hashtab.c | |
parent | 4f1cad002d1ff9c297ecbb799e83c5e8be6ebb8b (diff) | |
download | gcc-e0432c1c143af0e0f6b45d9606e62973373b714d.zip gcc-e0432c1c143af0e0f6b45d9606e62973373b714d.tar.gz gcc-e0432c1c143af0e0f6b45d9606e62973373b714d.tar.bz2 |
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
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 cbf8259..231fbc0 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]; } |