diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-08-28 20:52:19 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-11-14 22:12:07 +0100 |
commit | 6af422162fbc1c505526157ecf630e37694dbc7b (patch) | |
tree | ba21938ba4436767ca08998a3bc5512bd3187b7d /list.h | |
parent | Clean-up: Remove more dead and inactive code paths (diff) | |
download | openvpn-6af422162fbc1c505526157ecf630e37694dbc7b.tar.xz |
Clean-up: Removing useless code - hash related functions
Removed even more function which where practically empty and took away
some function arguments which were not used.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Acked-by: James Yonan <james@openvpn.net>
Diffstat (limited to '')
-rw-r--r-- | list.h | 25 |
1 files changed, 4 insertions, 21 deletions
@@ -88,7 +88,7 @@ bool hash_remove_fast (struct hash *hash, const void *key, uint32_t hv); -void hash_remove_by_value (struct hash *hash, void *value, bool autolock); +void hash_remove_by_value (struct hash *hash, void *value); struct hash_iterator { @@ -98,18 +98,16 @@ struct hash_iterator struct hash_element *elem; struct hash_element *last; bool bucket_marked; - bool autolock; int bucket_index_start; int bucket_index_end; }; void hash_iterator_init_range (struct hash *hash, struct hash_iterator *hi, - bool autolock, int start_bucket, int end_bucket); -void hash_iterator_init (struct hash *hash, struct hash_iterator *iter, bool autolock); +void hash_iterator_init (struct hash *hash, struct hash_iterator *iter); struct hash_element *hash_iterator_next (struct hash_iterator *hi); void hash_iterator_delete_element (struct hash_iterator *hi); void hash_iterator_free (struct hash_iterator *hi); @@ -147,21 +145,12 @@ hash_bucket (struct hash *hash, uint32_t hv) return &hash->buckets[hv & hash->mask]; } -static inline void -hash_bucket_lock (struct hash_bucket *bucket) -{ -} - -static inline void -hash_bucket_unlock (struct hash_bucket *bucket) -{ -} - static inline void * -hash_lookup_lock (struct hash *hash, const void *key, uint32_t hv) +hash_lookup (struct hash *hash, const void *key) { void *ret = NULL; struct hash_element *he; + uint32_t hv = hash_value (hash, key); struct hash_bucket *bucket = &hash->buckets[hv & hash->mask]; he = hash_lookup_fast (hash, bucket, key, hv); @@ -171,12 +160,6 @@ hash_lookup_lock (struct hash *hash, const void *key, uint32_t hv) return ret; } -static inline void * -hash_lookup (struct hash *hash, const void *key) -{ - return hash_lookup_lock (hash, key, hash_value (hash, key)); -} - /* NOTE: assumes that key is not a duplicate */ static inline void hash_add_fast (struct hash *hash, |