diff options
author | Sven Eckelmann <sven@narfation.org> | 2011-05-15 01:14:50 +0400 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-05-30 09:39:31 +0400 |
commit | 747e4221a03cde62402b614ca1f8e961b8416130 (patch) | |
tree | 98428064fef191a5093e276d5a779b9e801a97f0 /net/batman-adv/hash.h | |
parent | 38e3c5f0dae7a3bbb32c3b2bb28c3f2557d40fe9 (diff) | |
download | linux-747e4221a03cde62402b614ca1f8e961b8416130.tar.xz |
batman-adv: Add const type qualifier for pointers
batman-adv uses pointers which are marked as const and should not
violate that type qualifier by passing it to functions which force a
cast to the non-const version.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/hash.h')
-rw-r--r-- | net/batman-adv/hash.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/hash.h b/net/batman-adv/hash.h index 434822b27473..dd5c9fd7a905 100644 --- a/net/batman-adv/hash.h +++ b/net/batman-adv/hash.h @@ -28,12 +28,12 @@ * compare 2 element datas for their keys, * return 0 if same and not 0 if not * same */ -typedef int (*hashdata_compare_cb)(struct hlist_node *, void *); +typedef int (*hashdata_compare_cb)(const struct hlist_node *, const void *); /* the hashfunction, should return an index * based on the key in the data of the first * argument and the size the second */ -typedef int (*hashdata_choose_cb)(void *, int); +typedef int (*hashdata_choose_cb)(const void *, int); typedef void (*hashdata_free_cb)(struct hlist_node *, void *); struct hashtable_t { @@ -80,7 +80,7 @@ static inline void hash_delete(struct hashtable_t *hash, static inline int hash_add(struct hashtable_t *hash, hashdata_compare_cb compare, hashdata_choose_cb choose, - void *data, struct hlist_node *data_node) + const void *data, struct hlist_node *data_node) { int index; struct hlist_head *head; |