summaryrefslogtreecommitdiff
path: root/src/shared/hashmap.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2014-07-31 18:04:20 +0200
committerMichal Schmidt <mschmidt@redhat.com>2014-09-15 16:08:50 +0200
commit631b9deefbef76c5f69b165f33cb46690c938c95 (patch)
tree7abbac52254d016d2228f3b8d320f3221fc8dc04 /src/shared/hashmap.c
parentd5099efc47d4e6ac60816b5381a5f607ab03f06e (diff)
hashmap, set: remove unused functions
The following hashmap_* and set_* functions/macros have never had any users in systemd's history: *_iterate_backwards *_iterate_skip *_last *_FOREACH_BACKWARDS Remove this dead code.
Diffstat (limited to 'src/shared/hashmap.c')
-rw-r--r--src/shared/hashmap.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c
index 715484ce7c..1eadeced5c 100644
--- a/src/shared/hashmap.c
+++ b/src/shared/hashmap.c
@@ -753,59 +753,6 @@ at_end:
return NULL;
}
-void *hashmap_iterate_backwards(Hashmap *h, Iterator *i, const void **key) {
- struct hashmap_entry *e;
-
- assert(i);
-
- if (!h)
- goto at_beginning;
-
- if (*i == ITERATOR_FIRST)
- goto at_beginning;
-
- if (*i == ITERATOR_LAST && !h->iterate_list_tail)
- goto at_beginning;
-
- e = *i == ITERATOR_LAST ? h->iterate_list_tail : (struct hashmap_entry*) *i;
-
- if (e->iterate_previous)
- *i = (Iterator) e->iterate_previous;
- else
- *i = ITERATOR_FIRST;
-
- if (key)
- *key = e->key;
-
- return e->value;
-
-at_beginning:
- *i = ITERATOR_FIRST;
-
- if (key)
- *key = NULL;
-
- return NULL;
-}
-
-void *hashmap_iterate_skip(Hashmap *h, const void *key, Iterator *i) {
- unsigned hash;
- struct hashmap_entry *e;
-
- if (!h)
- return NULL;
-
- hash = bucket_hash(h, key);
-
- e = hash_scan(h, hash, key);
- if (!e)
- return NULL;
-
- *i = (Iterator) e;
-
- return e->value;
-}
-
void* hashmap_first(Hashmap *h) {
if (!h)
@@ -828,17 +775,6 @@ void* hashmap_first_key(Hashmap *h) {
return (void*) h->iterate_list_head->key;
}
-void* hashmap_last(Hashmap *h) {
-
- if (!h)
- return NULL;
-
- if (!h->iterate_list_tail)
- return NULL;
-
- return h->iterate_list_tail->value;
-}
-
void* hashmap_steal_first(Hashmap *h) {
void *data;