summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYejune Deng <yejune.deng@gmail.com>2021-03-10 11:23:43 +0800
committerDavid S. Miller <davem@davemloft.net>2021-03-10 12:45:15 -0800
commit3e6f20e09a455d95e61c60d03a9994848b0f853c (patch)
tree0ae721f6f470547b6d4f3259b3eb41c966cbec64 /net
parent4b18d5d1b2bab6d6ee20854c570bf29b560e9734 (diff)
downloadlinux-stable-3e6f20e09a455d95e61c60d03a9994848b0f853c.tar.gz
linux-stable-3e6f20e09a455d95e61c60d03a9994848b0f853c.tar.bz2
linux-stable-3e6f20e09a455d95e61c60d03a9994848b0f853c.zip
net/rds: Drop duplicate sin and sin6 assignments
There is no need to assign the msg->msg_name to sin or sin6, because there is DECLARE_SOCKADDR statement. Signed-off-by: Yejune Deng <yejune.deng@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/rds/recv.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c
index aba4afe4dfed..4db109fb6ec2 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -722,8 +722,6 @@ int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
if (msg->msg_name) {
if (ipv6_addr_v4mapped(&inc->i_saddr)) {
- sin = (struct sockaddr_in *)msg->msg_name;
-
sin->sin_family = AF_INET;
sin->sin_port = inc->i_hdr.h_sport;
sin->sin_addr.s_addr =
@@ -731,8 +729,6 @@ int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
memset(sin->sin_zero, 0, sizeof(sin->sin_zero));
msg->msg_namelen = sizeof(*sin);
} else {
- sin6 = (struct sockaddr_in6 *)msg->msg_name;
-
sin6->sin6_family = AF_INET6;
sin6->sin6_port = inc->i_hdr.h_sport;
sin6->sin6_addr = inc->i_saddr;