summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/hashtab.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-02-10 05:41:50 +0000
committerkan <kan@FreeBSD.org>2003-02-10 05:41:50 +0000
commit793833d7a78bb624965885760593495e7079d705 (patch)
treef843ff90d71b900271088361ed96ff82eb2a365d /contrib/gcc/hashtab.c
parent1b04fed26051ebc88f26a7bb93c63c270970e773 (diff)
downloadFreeBSD-src-793833d7a78bb624965885760593495e7079d705.zip
FreeBSD-src-793833d7a78bb624965885760593495e7079d705.tar.gz
Gcc 3.2.2-release.
Diffstat (limited to 'contrib/gcc/hashtab.c')
-rw-r--r--contrib/gcc/hashtab.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/gcc/hashtab.c b/contrib/gcc/hashtab.c
index 7477c35..37230d9 100644
--- a/contrib/gcc/hashtab.c
+++ b/contrib/gcc/hashtab.c
@@ -302,22 +302,24 @@ htab_expand (htab)
PTR *oentries;
PTR *olimit;
PTR *p;
+ size_t nsize;
oentries = htab->entries;
olimit = oentries + htab->size;
- htab->size = higher_prime_number (htab->size * 2);
+ nsize = higher_prime_number (htab->size * 2);
if (htab->return_allocation_failure)
{
- PTR *nentries = (PTR *) calloc (htab->size, sizeof (PTR *));
+ PTR *nentries = (PTR *) calloc (nsize, sizeof (PTR));
if (nentries == NULL)
return 0;
htab->entries = nentries;
}
else
- htab->entries = (PTR *) xcalloc (htab->size, sizeof (PTR *));
+ htab->entries = (PTR *) xcalloc (nsize, sizeof (PTR));
+ htab->size = nsize;
htab->n_elements -= htab->n_deleted;
htab->n_deleted = 0;
OpenPOWER on IntegriCloud