From: DJ Delorie Date: Thu, 30 Oct 2003 18:39:13 +0000 (+0000) Subject: merge from gcc X-Git-Tag: cagney_bigcore-20040122-branchpoint~993 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=686e72d729cf3ba9e15d5b9700d63c6a5bd88d21;p=external%2Fbinutils.git merge from gcc --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 6264fbf..34f421e 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,8 @@ +2003-10-30 Josef Zlomek + + * 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 * cplus-dem.c (demangle_template): Register a new Btype only 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]; }