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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user