chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
137eba3
)
hashmap: allow NULL key in ordered_hashmap_next()
author
Michal Schmidt
<mschmidt@redhat.com>
Tue, 16 Jun 2015 13:46:40 +0000
(15:46 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:03:02 +0000
(10:03 +0100)
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
patch
|
blob
|
history
diff --git
a/src/shared/hashmap.c
b/src/shared/hashmap.c
index 0ee2f3bd317ce50abfe7729a919cb9ed8a4b6a36..e5f05f36f8fb93daf02b744d0cf5791f7ee1a9cc 100644
(file)
--- 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;