From 747e4221a03cde62402b614ca1f8e961b8416130 Mon Sep 17 00:00:00 2001 From: Sven Eckelmann Date: Sat, 14 May 2011 23:14:50 +0200 Subject: 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 --- net/batman-adv/translation-table.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'net/batman-adv/translation-table.h') diff --git a/net/batman-adv/translation-table.h b/net/batman-adv/translation-table.h index 46152c38cc95..0f2b9905cfc4 100644 --- a/net/batman-adv/translation-table.h +++ b/net/batman-adv/translation-table.h @@ -23,21 +23,22 @@ #define _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ int tt_local_init(struct bat_priv *bat_priv); -void tt_local_add(struct net_device *soft_iface, uint8_t *addr); +void tt_local_add(struct net_device *soft_iface, const uint8_t *addr); void tt_local_remove(struct bat_priv *bat_priv, - uint8_t *addr, char *message); + const uint8_t *addr, const char *message); int tt_local_fill_buffer(struct bat_priv *bat_priv, unsigned char *buff, int buff_len); int tt_local_seq_print_text(struct seq_file *seq, void *offset); void tt_local_free(struct bat_priv *bat_priv); int tt_global_init(struct bat_priv *bat_priv); void tt_global_add_orig(struct bat_priv *bat_priv, - struct orig_node *orig_node, - unsigned char *tt_buff, int tt_buff_len); + struct orig_node *orig_node, + const unsigned char *tt_buff, int tt_buff_len); int tt_global_seq_print_text(struct seq_file *seq, void *offset); void tt_global_del_orig(struct bat_priv *bat_priv, - struct orig_node *orig_node, char *message); + struct orig_node *orig_node, const char *message); void tt_global_free(struct bat_priv *bat_priv); -struct orig_node *transtable_search(struct bat_priv *bat_priv, uint8_t *addr); +struct orig_node *transtable_search(struct bat_priv *bat_priv, + const uint8_t *addr); #endif /* _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ */ -- cgit v1.2.3-55-g7522