chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
journald: set group ownership of journal files to 'adm' by default
[elogind.git]
/
src
/
hashmap.c
diff --git
a/src/hashmap.c
b/src/hashmap.c
index 95ea45da4893662d42b569f16914acf6ec4101e9..7ef809746d3a67f0cfbf4220bbcd05bd673bce93 100644
(file)
--- a/
src/hashmap.c
+++ b/
src/hashmap.c
@@
-558,6
+558,17
@@
void* hashmap_first(Hashmap *h) {
return h->iterate_list_head->value;
}
+void* hashmap_first_key(Hashmap *h) {
+
+ if (!h)
+ return NULL;
+
+ if (!h->iterate_list_head)
+ return NULL;
+
+ return (void*) h->iterate_list_head->key;
+}
+
void* hashmap_last(Hashmap *h) {
if (!h)