hashtable: bugfix - increment size only when new bins are linked
authorBrian Norris <banorris@uci.edu>
Sat, 11 Aug 2012 00:44:36 +0000 (17:44 -0700)
committerBrian Norris <banorris@uci.edu>
Sat, 11 Aug 2012 00:49:01 +0000 (17:49 -0700)
commit18e9e9e8f1bc9c12049520498e06e24d25d8d72d
tree651c748a67859f9b8bb9e3c83bd94783b5993325
parente32494ed2cfb8353b7ccfab60a89421314ee9068
hashtable: bugfix - increment size only when new bins are linked

In both put() and ensureptr(), the 'size' counter should not be incremented
until we decide if we're adding a new bin or not. When incremented improperly,
'size' ended up out of sync with the hash table; it reported a size much larger
than the actual table.
hashtable.h