From b0c8498704d91b644ee3203177b0f602ab13826e Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Tue, 16 Jun 2015 15:46:40 +0200 Subject: [PATCH] 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/shared/hashmap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c index 0ee2f3bd3..e5f05f36f 100644 --- a/src/shared/hashmap.c +++ b/src/shared/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; -- 2.30.2