From 8f8a5213a9ad89f1ebab6efb19377ed9df512ee6 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Tue, 16 Jun 2015 15:46:40 +0200 Subject: 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. --- src/basic/hashmap.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/basic') diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index 0ee2f3bd31..e5f05f36f8 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -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; -- cgit v1.2.3-54-g00ecf