Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88924753 authored by Cong Wang's avatar Cong Wang Committed by David S. Miller
Browse files

ipv6: use ipv6_addr_scope() helper



ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK could be replaced
by ipv6_addr_scope(), which is slightly faster.

Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7996c799
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1126,8 +1126,7 @@ retry:


	ift = !max_addresses ||
	ift = !max_addresses ||
	      ipv6_count_addresses(idev) < max_addresses ?
	      ipv6_count_addresses(idev) < max_addresses ?
		ipv6_add_addr(idev, &addr, tmp_plen,
		ipv6_add_addr(idev, &addr, tmp_plen, ipv6_addr_scope(&addr),
			      ipv6_addr_type(&addr)&IPV6_ADDR_SCOPE_MASK,
			      addr_flags) : NULL;
			      addr_flags) : NULL;
	if (IS_ERR_OR_NULL(ift)) {
	if (IS_ERR_OR_NULL(ift)) {
		in6_ifa_put(ifp);
		in6_ifa_put(ifp);