Browse Source

merge from gcc

binutils-2_14-branch
DJ Delorie 24 years ago
parent
commit
2336e17716
  1. 8
      libiberty/ChangeLog
  2. 4
      libiberty/hashtab.c

8
libiberty/ChangeLog

@ -1,3 +1,11 @@
2003-12-03 Jan Hubicka <jh@suse.cz>
* hashtab.c (htab_expand): Fix warning.
* hashtab.c (htab_expand): Compute the size of hashtable based
on the number of elements actually used.
(htab_traverse): Call htab_expand when table is too empty.
2003-12-03 Jan Hubicka <jh@suse.cz>
* hashtab.c (htab_expand): Compute the size of hashtable based

4
libiberty/hashtab.c

@ -376,8 +376,8 @@ htab_expand (htab)
/* Resize only when table after removal of unused elements is either
too full or too empty. */
if ((htab->n_elements - htab->n_deleted) * 2 > htab->size
|| (htab->n_elements - htab->n_deleted) * 8 < htab->size
&& htab->size > 32)
|| ((htab->n_elements - htab->n_deleted) * 8 < htab->size
&& htab->size > 32))
nsize = higher_prime_number ((htab->n_elements - htab->n_deleted) * 2);
else
nsize = htab->size;

Loading…
Cancel
Save