changeset 27901:70c1647c2bfc

(maybe_resize_hash_table): Handle case of new size coming out as being the same as old size.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 29 Feb 2000 09:30:43 +0000
parents 117f66873369
children 27af8b008c69
files src/fns.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Mon Feb 28 06:23:55 2000 +0000
+++ b/src/fns.c	Tue Feb 29 09:30:43 2000 +0000
@@ -3826,6 +3826,7 @@
 	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)