merge from gcc
authorDJ Delorie <dj@redhat.com>
Wed, 12 Mar 2003 17:28:10 +0000 (17:28 +0000)
committerDJ Delorie <dj@redhat.com>
Wed, 12 Mar 2003 17:28:10 +0000 (17:28 +0000)
libiberty/ChangeLog
libiberty/hashtab.c

index 99ac6ec290396cac1ab5f506da93bc02146004ee..a45e537f4e26c0ea77497b7e22422ada92ec1320 100644 (file)
@@ -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
index a0cb5a75820b559b1f50bf19070cd97bf4f21803..ebaa43b2c5083072c1cfb7bfb4c4d140885e7afc 100644 (file)
@@ -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;
This page took 0.037994 seconds and 4 git commands to generate.