diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-12 16:43:21 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-12 16:43:21 +0000 |
commit | 6d4061d0f21bdce2839d2bc11a0a3d35c3aaf60b (patch) | |
tree | 3dc046b847bc520e0fc2c7cb75896de107ae6ee7 /libiberty | |
parent | c83ee61323184ddff3427c5c5a05c5dcd1e792f2 (diff) | |
download | gcc-6d4061d0f21bdce2839d2bc11a0a3d35c3aaf60b.tar.gz |
* hashtab.c (htab_expand): Fix warning.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64249 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libiberty')
-rw-r--r-- | libiberty/ChangeLog | 2 | ||||
-rw-r--r-- | libiberty/hashtab.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 16d0b98e123..052d99f4575 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,5 +1,7 @@ 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. diff --git a/libiberty/hashtab.c b/libiberty/hashtab.c index a0cb5a75820..ebaa43b2c50 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; |