-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Jim Meyering on 6/17/2009 12:20 PM:
>> Here's what I squashed to fix things:
>
> Thanks. I'd noticed ;-)
>
> I noticed another problem: this fails when n_buckets_used is 0:
>
> size_t needed = table->n_buckets_used - 1;
Good catch. I've squashed this in (plus the accompanying indentation
change)...
diff --git a/lib/hash.c b/lib/hash.c
index e77184a..9d78990 100644
- --- a/lib/hash.c
+++ b/lib/hash.c
@@ -863,6 +863,7 @@ hash_rehash (Hash_table *table, size_t candidate)
check that there are at least table->n_buckets_used-1 entries on
the free entry list for the worst case collision (everything gets
combined into one bucket during the rehash). */
+ if (table->n_buckets_used)
{
size_t needed = table->n_buckets_used - 1;
size_t available;
>
> Would you please post (or push somewhere) your patches?
and posted it all here (sorry for not doing that sooner):
http://repo.or.cz/w/gnulib/ericb.git
$ git pull git://repo.or.cz/gnulib/ericb.git master
So far, though, I have not attempted anything to resolve the hash_rehash
failure to allow multiple resizes.
- --
Don't work too hard, make some time for fun as well!
Eric Blake [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAko5PKkACgkQ84KuGfSFAYBLmQCgrpRV4v3+a73+awRLbzgMSsGk
FR4An1hvyWMsw7erzZtP7gnGQzBHmas3
=zbtI
-----END PGP SIGNATURE-----