Skip to content

Commit

Permalink
ipv6: remove useless assignment to newinet in tcp_v6_syn_recv_sock()
Browse files Browse the repository at this point in the history
The newinet value is initialized with inet_sk() in a block code to
handle sockets for the ETH_P_IP protocol. Along this code path,
newinet is never read. Thus, assignment to newinet is needless and
can be removed.

Signed-off-by: Nghia Le <nghialm78@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20211104143740.32446-1-nghialm78@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Nghia Le authored and kuba-moo committed Nov 6, 2021
1 parent 9bea6aa commit 70bf363
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,6 @@ static struct sock *tcp_v6_syn_recv_sock(const struct sock *sk, struct sk_buff *

inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk);

newinet = inet_sk(newsk);
newnp = tcp_inet6_sk(newsk);
newtp = tcp_sk(newsk);

Expand Down

0 comments on commit 70bf363

Please sign in to comment.