diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2011-11-20 22:39:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:43:32 -0500 |
commit | 4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6 (patch) | |
tree | da3fbec7672ac6b967dfa31cec6c88f468a57fa2 /net/ipv6/udp.c | |
parent | 40ba84993d66469d336099c5af74c3da5b73e28d (diff) |
net: remove ipv6_addr_copy()
C assignment can handle struct in6_addr copying.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/udp.c')
-rw-r--r-- | net/ipv6/udp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index ccfb0451b1c3..84ec9db86ee0 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -417,8 +417,7 @@ try_again: | |||
417 | ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, | 417 | ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr, |
418 | &sin6->sin6_addr); | 418 | &sin6->sin6_addr); |
419 | else { | 419 | else { |
420 | ipv6_addr_copy(&sin6->sin6_addr, | 420 | sin6->sin6_addr = ipv6_hdr(skb)->saddr; |
421 | &ipv6_hdr(skb)->saddr); | ||
422 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) | 421 | if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) |
423 | sin6->sin6_scope_id = IP6CB(skb)->iif; | 422 | sin6->sin6_scope_id = IP6CB(skb)->iif; |
424 | } | 423 | } |
@@ -1115,11 +1114,11 @@ do_udp_sendmsg: | |||
1115 | 1114 | ||
1116 | fl6.flowi6_proto = sk->sk_protocol; | 1115 | fl6.flowi6_proto = sk->sk_protocol; |
1117 | if (!ipv6_addr_any(daddr)) | 1116 | if (!ipv6_addr_any(daddr)) |
1118 | ipv6_addr_copy(&fl6.daddr, daddr); | 1117 | fl6.daddr = *daddr; |
1119 | else | 1118 | else |
1120 | fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ | 1119 | fl6.daddr.s6_addr[15] = 0x1; /* :: means loopback (BSD'ism) */ |
1121 | if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) | 1120 | if (ipv6_addr_any(&fl6.saddr) && !ipv6_addr_any(&np->saddr)) |
1122 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 1121 | fl6.saddr = np->saddr; |
1123 | fl6.fl6_sport = inet->inet_sport; | 1122 | fl6.fl6_sport = inet->inet_sport; |
1124 | 1123 | ||
1125 | final_p = fl6_update_dst(&fl6, opt, &final); | 1124 | final_p = fl6_update_dst(&fl6, opt, &final); |