o ipv6/route: use C99 style init for struct init

Also move ft6_dflt_pointer to .bss and use void
in ip6_dst_gc as it doesn't take any paramenters
parent de31bfca
...@@ -121,9 +121,8 @@ struct rt6_info ip6_null_entry = { ...@@ -121,9 +121,8 @@ struct rt6_info ip6_null_entry = {
}; };
struct fib6_node ip6_routing_table = { struct fib6_node ip6_routing_table = {
NULL, NULL, NULL, NULL, .leaf = &ip6_null_entry,
&ip6_null_entry, .fn_flags = RTN_ROOT | RTN_TL_ROOT | RTN_RTINFO,
0, RTN_ROOT|RTN_TL_ROOT|RTN_RTINFO, 0
}; };
/* Protects all the ip6 fib */ /* Protects all the ip6 fib */
...@@ -174,7 +173,7 @@ static __inline__ struct rt6_info *rt6_device_match(struct rt6_info *rt, ...@@ -174,7 +173,7 @@ static __inline__ struct rt6_info *rt6_device_match(struct rt6_info *rt,
/* /*
* pointer to the last default router chosen. BH is disabled locally. * pointer to the last default router chosen. BH is disabled locally.
*/ */
static struct rt6_info *rt6_dflt_pointer = NULL; static struct rt6_info *rt6_dflt_pointer;
static spinlock_t rt6_dflt_lock = SPIN_LOCK_UNLOCKED; static spinlock_t rt6_dflt_lock = SPIN_LOCK_UNLOCKED;
/* Default Router Selection (RFC 2461 6.3.6) */ /* Default Router Selection (RFC 2461 6.3.6) */
...@@ -559,7 +558,7 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu) ...@@ -559,7 +558,7 @@ static void ip6_rt_update_pmtu(struct dst_entry *dst, u32 mtu)
} }
} }
static int ip6_dst_gc() static int ip6_dst_gc(void)
{ {
static unsigned expire = 30*HZ; static unsigned expire = 30*HZ;
static unsigned long last_gc; static unsigned long last_gc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment