Skip to content

Commit

Permalink
nexthop: remove redundant assignment to err
Browse files Browse the repository at this point in the history
The variable err is initialized with a value that is never read
and err is reassigned a few statements later. This initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Colin Ian King authored and David S. Miller committed May 31, 2019
1 parent 6912378 commit 6f43e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/nexthop.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ static int nh_create_ipv6(struct net *net, struct nexthop *nh,
.fc_encap = cfg->nh_encap,
.fc_encap_type = cfg->nh_encap_type,
};
int err = -EINVAL;
int err;

if (!ipv6_addr_any(&cfg->gw.ipv6))
fib6_cfg.fc_flags |= RTF_GATEWAY;
Expand Down

0 comments on commit 6f43e52

Please sign in to comment.