summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEnrico Weigelt <info@metux.net>2019-06-06 17:43:17 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-09 22:47:30 +0300
commitc3fee640bcf52c34a25b767f2b0eda82e97a1f3b (patch)
tree26f378c06975af74eb4dcb4b04d661b328cb2a99 /net
parent38e406f600a2b6dca9c262603f6e2a31cfb792b8 (diff)
downloadlinux-c3fee640bcf52c34a25b767f2b0eda82e97a1f3b.tar.xz
net: ipv4: fib_semantics: fix uninitialized variable
fix an uninitialized variable: CC net/ipv4/fib_semantics.o net/ipv4/fib_semantics.c: In function 'fib_check_nh_v4_gw': net/ipv4/fib_semantics.c:1027:12: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized] if (!tbl || err) { ^~ Signed-off-by: Enrico Weigelt <info@metux.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/fib_semantics.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index b80410673915..bfa49a88d03a 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -964,7 +964,7 @@ static int fib_check_nh_v4_gw(struct net *net, struct fib_nh *nh, u32 table,
{
struct net_device *dev;
struct fib_result res;
- int err;
+ int err = 0;
if (nh->fib_nh_flags & RTNH_F_ONLINK) {
unsigned int addr_type;