summaryrefslogtreecommitdiff
path: root/src/libudev/hashmap.c
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2013-06-06 00:18:45 -0400
committerAnthony G. Basile <blueness@gentoo.org>2013-06-06 00:18:45 -0400
commit6f8f3edfe8dd70e24105d889f664ff033eb0555e (patch)
treec9a74b97b9c9cc01cd2608ba1506f8c70f2d8df6 /src/libudev/hashmap.c
parentac6af1454474115a0105f07c5704e13e40d0ff0e (diff)
Round 3 of remove unused functions from src/libudev/{conf-files,hashmap,util}
The following functions were removed: strv_env_get_n strv_env_get conf_files_list hashmap_remove hashmap_move log_dump_internal parse_uid read_full_file strstrip file_in_same_dir cunescape cunescape_length cunescape_length_with_prefix xescape dirent_is_file close_all_fds read_one_char ask reset_terminal_fd reset_terminal flush_fd loop_read get_ctty_devnr get_ctty rm_rf_children rm_rf_children_dangerous rm_rf status_vprintf fd_columns columns fd_lines lines on_tty ellipsize ellipsize_mem touch unquote resolve_dev_console tty_is_vc vtnr_from_tty terminal_vhangup_fd terminal_vhangup file_is_priv_sticky signal_from_string fd_wait_for_event memdup memdup_multiply Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/hashmap.c')
-rw-r--r--src/libudev/hashmap.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/src/libudev/hashmap.c b/src/libudev/hashmap.c
index 6626288cdc..58702d7d59 100644
--- a/src/libudev/hashmap.c
+++ b/src/libudev/hashmap.c
@@ -103,19 +103,6 @@ static void deallocate_tile(void **first_tile, void *p) {
*first_tile = p;
}
-#ifdef VALGRIND
-
-static void drop_pool(struct pool *p) {
- while (p) {
- struct pool *n;
- n = p->next;
- free(p);
- p = n;
- }
-}
-
-#endif
-
unsigned string_hash_func(const void *p) {
unsigned hash = 5381;
const signed char *c;
@@ -363,25 +350,6 @@ bool hashmap_contains(Hashmap *h, const void *key) {
return true;
}
-void* hashmap_remove(Hashmap *h, const void *key) {
- struct hashmap_entry *e;
- unsigned hash;
- void *data;
-
- if (!h)
- return NULL;
-
- hash = h->hash_func(key) % NBUCKETS;
-
- if (!(e = hash_scan(h, hash, key)))
- return NULL;
-
- data = e->value;
- remove_entry(h, e);
-
- return data;
-}
-
void *hashmap_iterate(Hashmap *h, Iterator *i, const void **key) {
struct hashmap_entry *e;
@@ -494,34 +462,6 @@ int hashmap_merge(Hashmap *h, Hashmap *other) {
return 0;
}
-void hashmap_move(Hashmap *h, Hashmap *other) {
- struct hashmap_entry *e, *n;
-
- assert(h);
-
- /* The same as hashmap_merge(), but every new item from other
- * is moved to h. This function is guaranteed to succeed. */
-
- if (!other)
- return;
-
- for (e = other->iterate_list_head; e; e = n) {
- unsigned h_hash, other_hash;
-
- n = e->iterate_next;
-
- h_hash = h->hash_func(e->key) % NBUCKETS;
-
- if (hash_scan(h, h_hash, e->key))
- continue;
-
- other_hash = other->hash_func(e->key) % NBUCKETS;
-
- unlink_entry(other, e, other_hash);
- link_entry(h, e, h_hash);
- }
-}
-
char **hashmap_get_strv(Hashmap *h) {
char **sv;
Iterator it;