hash: minor optimization
authorEric Blake <ebb9@byu.net>
Thu, 18 Jun 2009 12:56:13 +0000 (06:56 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 18 Jun 2009 13:20:14 +0000 (07:20 -0600)
commit16908fc83e83a08e4f0e8c004141ff01ae12ca86
treeb24d1eaae052a92d4299ca133ec249b7b76c5c75
parent9f950c184f8b242fb134472f862ba2a99347b8b3
hash: minor optimization

* lib/hash.c (hash_lookup, hash_find_entry): Avoid function call
when possible.
(hash_initialize): Document this promise.
(hash_do_for_each, hash_clear, hash_free): Use C89 syntax.
* tests/test-hash.c (hash_compare_strings): Test this.

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