hashmap: allow NULL key in ordered_hashmap_next()

There is no reason to require key to be non-NULL.
Change test_ordered_hashmap_next() to use trivial_hash_ops in order to
test NULL key too.
This commit is contained in:
Michal Schmidt
2015-06-17 17:28:44 +02:00
parent 49e440cdc9
commit 8f8a5213a9
2 changed files with 10 additions and 33 deletions
-2
View File
@@ -1798,8 +1798,6 @@ void *ordered_hashmap_next(OrderedHashmap *h, const void *key) {
struct ordered_hashmap_entry *e;
unsigned hash, idx;
assert(key);
if (!h)
return NULL;