From: DJ Delorie Date: Wed, 12 Mar 2003 17:28:10 +0000 (+0000) Subject: merge from gcc X-Git-Tag: binutils-2_14-branchpoint~526 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2336e177169b6a339fdada43bc3d1ce8173290cd;p=external%2Fbinutils.git merge from gcc --- diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 99ac6ec..a45e537 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,5 +1,13 @@ 2003-12-03 Jan Hubicka + * 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 + * 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. diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index a0cb5a7..ebaa43b 100644 --- a/libiberty/hashtab.c +++ b/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;