hash: check for resize before insertion
authorEric Blake <ebb9@byu.net>
Wed, 17 Jun 2009 19:01:41 +0000 (13:01 -0600)
committerJim Meyering <meyering@redhat.com>
Thu, 18 Jun 2009 07:12:06 +0000 (09:12 +0200)
commit1d1b26278aece6b648d6d8ffffdae809cfd95973
tree430034750280b1750974079f2323d06574d24db9
parentae156c0bf8058d3c1568c1ed573a1319a451ac7e
hash: check for resize before insertion

* lib/hash.c (hash_insert): Check whether bucket usage exceeds
threshold before insertion, so that a pathological hash_rehash
that fills every bucket can still trigger another rehash.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/hash.c