diff options
author | Enrico Weigelt <info@metux.net> | 2019-06-06 16:43:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-09 12:47:30 -0700 |
commit | c3fee640bcf52c34a25b767f2b0eda82e97a1f3b (patch) | |
tree | 26f378c06975af74eb4dcb4b04d661b328cb2a99 /net/ipv4 | |
parent | 38e406f600a2b6dca9c262603f6e2a31cfb792b8 (diff) | |
download | linux-stable-c3fee640bcf52c34a25b767f2b0eda82e97a1f3b.tar.gz linux-stable-c3fee640bcf52c34a25b767f2b0eda82e97a1f3b.tar.bz2 linux-stable-c3fee640bcf52c34a25b767f2b0eda82e97a1f3b.zip |
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/ipv4')
-rw-r--r-- | net/ipv4/fib_semantics.c | 2 |
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; |