]> git.eshelyaron.com Git - emacs.git/commitdiff
(maybe_resize_hash_table): Handle case of new size
authorGerd Moellmann <gerd@gnu.org>
Tue, 29 Feb 2000 09:30:43 +0000 (09:30 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 29 Feb 2000 09:30:43 +0000 (09:30 +0000)
coming out as being the same as old size.

src/fns.c

index e6ff683594765d95c7c6f61de5ee53913d6d3338..9c06764bdb3edb04961517ec5f33af6c76637d7e 100644 (file)
--- a/src/fns.c
+++ b/src/fns.c
@@ -3826,6 +3826,7 @@ maybe_resize_hash_table (h)
        new_size = old_size + XFASTINT (h->rehash_size);
       else
        new_size = old_size * XFLOATINT (h->rehash_size);
+      new_size = max (old_size + 1, new_size);
       index_size = next_almost_prime (new_size
                                      / XFLOATINT (h->rehash_threshold));
       if (max (index_size, 2 * new_size) & ~VALMASK)