summaryrefslogtreecommitdiff
path: root/net/batman-adv/bat_v_ogm.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-07-25 00:42:44 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-10-19 08:37:52 +0200
commit422d2f77803d85477df72f3153e85fd2b8c6b9e9 (patch)
treef1dc7de3ad08d605866799de920f367e4b185795 /net/batman-adv/bat_v_ogm.c
parent393b299d2cb804f09e05aafbdce9e3d3f61438cf (diff)
batman-adv: Remove needless init of variables on stack
Some variables are overwritten immediatelly in a functions. These don't have to be initialized to a specific value on the stack because the value will be overwritten before they will be used anywhere. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/bat_v_ogm.c')
-rw-r--r--net/batman-adv/bat_v_ogm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/batman-adv/bat_v_ogm.c b/net/batman-adv/bat_v_ogm.c
index 1aeeadca620c..61ff5f82cfbf 100644
--- a/net/batman-adv/bat_v_ogm.c
+++ b/net/batman-adv/bat_v_ogm.c
@@ -401,7 +401,7 @@ static int batadv_v_ogm_metric_update(struct batadv_priv *bat_priv,
struct batadv_hard_iface *if_incoming,
struct batadv_hard_iface *if_outgoing)
{
- struct batadv_orig_ifinfo *orig_ifinfo = NULL;
+ struct batadv_orig_ifinfo *orig_ifinfo;
struct batadv_neigh_ifinfo *neigh_ifinfo = NULL;
bool protection_started = false;
int ret = -EINVAL;
@@ -486,7 +486,7 @@ static bool batadv_v_ogm_route_update(struct batadv_priv *bat_priv,
struct batadv_hard_iface *if_outgoing)
{
struct batadv_neigh_node *router = NULL;
- struct batadv_orig_node *orig_neigh_node = NULL;
+ struct batadv_orig_node *orig_neigh_node;
struct batadv_neigh_node *orig_neigh_router = NULL;
struct batadv_neigh_ifinfo *router_ifinfo = NULL, *neigh_ifinfo = NULL;
u32 router_throughput, neigh_throughput;