提交 170173bf 编写于 作者: S Sven Eckelmann 提交者: Antonio Quartulli

batman-adv: Remove instant overwritten variable initialization

Signed-off-by: NSven Eckelmann <sven@narfation.org>
Signed-off-by: NMarek Lindner <lindner_marek@yahoo.de>
Signed-off-by: NAntonio Quartulli <ordex@autistici.org>
上级 068ee6e2
...@@ -688,7 +688,7 @@ int batadv_throw_uevent(struct batadv_priv *bat_priv, enum batadv_uev_type type, ...@@ -688,7 +688,7 @@ int batadv_throw_uevent(struct batadv_priv *bat_priv, enum batadv_uev_type type,
enum batadv_uev_action action, const char *data) enum batadv_uev_action action, const char *data)
{ {
int ret = -ENOMEM; int ret = -ENOMEM;
struct batadv_hard_iface *primary_if = NULL; struct batadv_hard_iface *primary_if;
struct kobject *bat_kobj; struct kobject *bat_kobj;
char *uevent_env[4] = { NULL, NULL, NULL, NULL }; char *uevent_env[4] = { NULL, NULL, NULL, NULL };
......
...@@ -256,8 +256,8 @@ void batadv_tt_local_add(struct net_device *soft_iface, const uint8_t *addr, ...@@ -256,8 +256,8 @@ void batadv_tt_local_add(struct net_device *soft_iface, const uint8_t *addr,
int ifindex) int ifindex)
{ {
struct batadv_priv *bat_priv = netdev_priv(soft_iface); struct batadv_priv *bat_priv = netdev_priv(soft_iface);
struct batadv_tt_local_entry *tt_local = NULL; struct batadv_tt_local_entry *tt_local;
struct batadv_tt_global_entry *tt_global = NULL; struct batadv_tt_global_entry *tt_global;
struct hlist_head *head; struct hlist_head *head;
struct hlist_node *node; struct hlist_node *node;
struct batadv_tt_orig_list_entry *orig_entry; struct batadv_tt_orig_list_entry *orig_entry;
...@@ -544,7 +544,7 @@ uint16_t batadv_tt_local_remove(struct batadv_priv *bat_priv, ...@@ -544,7 +544,7 @@ uint16_t batadv_tt_local_remove(struct batadv_priv *bat_priv,
const uint8_t *addr, const char *message, const uint8_t *addr, const char *message,
bool roaming) bool roaming)
{ {
struct batadv_tt_local_entry *tt_local_entry = NULL; struct batadv_tt_local_entry *tt_local_entry;
uint16_t flags, curr_flags = BATADV_NO_FLAGS; uint16_t flags, curr_flags = BATADV_NO_FLAGS;
tt_local_entry = batadv_tt_local_hash_find(bat_priv, addr); tt_local_entry = batadv_tt_local_hash_find(bat_priv, addr);
...@@ -784,8 +784,8 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv, ...@@ -784,8 +784,8 @@ int batadv_tt_global_add(struct batadv_priv *bat_priv,
const unsigned char *tt_addr, uint8_t flags, const unsigned char *tt_addr, uint8_t flags,
uint8_t ttvn) uint8_t ttvn)
{ {
struct batadv_tt_global_entry *tt_global_entry = NULL; struct batadv_tt_global_entry *tt_global_entry;
struct batadv_tt_local_entry *tt_local_entry = NULL; struct batadv_tt_local_entry *tt_local_entry;
int ret = 0; int ret = 0;
int hash_added; int hash_added;
struct batadv_tt_common_entry *common; struct batadv_tt_common_entry *common;
...@@ -1067,7 +1067,7 @@ static void batadv_tt_global_del(struct batadv_priv *bat_priv, ...@@ -1067,7 +1067,7 @@ static void batadv_tt_global_del(struct batadv_priv *bat_priv,
const unsigned char *addr, const unsigned char *addr,
const char *message, bool roaming) const char *message, bool roaming)
{ {
struct batadv_tt_global_entry *tt_global_entry = NULL; struct batadv_tt_global_entry *tt_global_entry;
struct batadv_tt_local_entry *local_entry = NULL; struct batadv_tt_local_entry *local_entry = NULL;
tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr); tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr);
...@@ -1670,7 +1670,7 @@ static bool ...@@ -1670,7 +1670,7 @@ static bool
batadv_send_other_tt_response(struct batadv_priv *bat_priv, batadv_send_other_tt_response(struct batadv_priv *bat_priv,
struct batadv_tt_query_packet *tt_request) struct batadv_tt_query_packet *tt_request)
{ {
struct batadv_orig_node *req_dst_orig_node = NULL; struct batadv_orig_node *req_dst_orig_node;
struct batadv_orig_node *res_dst_orig_node = NULL; struct batadv_orig_node *res_dst_orig_node = NULL;
struct batadv_neigh_node *neigh_node = NULL; struct batadv_neigh_node *neigh_node = NULL;
struct batadv_hard_iface *primary_if = NULL; struct batadv_hard_iface *primary_if = NULL;
...@@ -1805,7 +1805,7 @@ static bool ...@@ -1805,7 +1805,7 @@ static bool
batadv_send_my_tt_response(struct batadv_priv *bat_priv, batadv_send_my_tt_response(struct batadv_priv *bat_priv,
struct batadv_tt_query_packet *tt_request) struct batadv_tt_query_packet *tt_request)
{ {
struct batadv_orig_node *orig_node = NULL; struct batadv_orig_node *orig_node;
struct batadv_neigh_node *neigh_node = NULL; struct batadv_neigh_node *neigh_node = NULL;
struct batadv_hard_iface *primary_if = NULL; struct batadv_hard_iface *primary_if = NULL;
uint8_t my_ttvn, req_ttvn, ttvn; uint8_t my_ttvn, req_ttvn, ttvn;
...@@ -1971,7 +1971,7 @@ static void _batadv_tt_update_changes(struct batadv_priv *bat_priv, ...@@ -1971,7 +1971,7 @@ static void _batadv_tt_update_changes(struct batadv_priv *bat_priv,
static void batadv_tt_fill_gtable(struct batadv_priv *bat_priv, static void batadv_tt_fill_gtable(struct batadv_priv *bat_priv,
struct batadv_tt_query_packet *tt_response) struct batadv_tt_query_packet *tt_response)
{ {
struct batadv_orig_node *orig_node = NULL; struct batadv_orig_node *orig_node;
orig_node = batadv_orig_hash_find(bat_priv, tt_response->src); orig_node = batadv_orig_hash_find(bat_priv, tt_response->src);
if (!orig_node) if (!orig_node)
...@@ -2013,7 +2013,7 @@ static void batadv_tt_update_changes(struct batadv_priv *bat_priv, ...@@ -2013,7 +2013,7 @@ static void batadv_tt_update_changes(struct batadv_priv *bat_priv,
bool batadv_is_my_client(struct batadv_priv *bat_priv, const uint8_t *addr) bool batadv_is_my_client(struct batadv_priv *bat_priv, const uint8_t *addr)
{ {
struct batadv_tt_local_entry *tt_local_entry = NULL; struct batadv_tt_local_entry *tt_local_entry;
bool ret = false; bool ret = false;
tt_local_entry = batadv_tt_local_hash_find(bat_priv, addr); tt_local_entry = batadv_tt_local_hash_find(bat_priv, addr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册