diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-12-31 00:59:37 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-12-31 00:59:37 +0100 |
commit | dc1ecd78e9f046880d10ddb45cf9b06df1084b10 (patch) | |
tree | 696491346a7fa69f8620a99cb7c0d2d87f2da7cf /src/hashmap.c | |
parent | 69b1c67463de64fb32ba75f586f0c9d2716f3e02 (diff) | |
parent | 74ef2d16ada74db3059d825ce8d24ea74946bf8f (diff) |
Merge branch 'journal'
Diffstat (limited to 'src/hashmap.c')
-rw-r--r-- | src/hashmap.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/hashmap.c b/src/hashmap.c index 95ea45da48..7ef809746d 100644 --- 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) |