diff options
author | ae <ae@FreeBSD.org> | 2013-01-09 18:54:58 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2013-01-09 18:54:58 +0000 |
commit | 6be782d67ff6e2df83d0faaa1fe27c7146656e18 (patch) | |
tree | e4fe65213754888810fc74a888d38a38c849e4e5 /sys/netinet6 | |
parent | fc044aacf6364972c1c45db0b3c395e778c8f9e6 (diff) | |
download | FreeBSD-src-6be782d67ff6e2df83d0faaa1fe27c7146656e18.zip FreeBSD-src-6be782d67ff6e2df83d0faaa1fe27c7146656e18.tar.gz |
Remove unneeded variable.
MFC after: 1 week
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/scope6.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index 74d034e..79040c2 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -336,7 +336,6 @@ scope6_addr2default(struct in6_addr *addr) int sa6_embedscope(struct sockaddr_in6 *sin6, int defaultok) { - struct ifnet *ifp; u_int32_t zoneid; if ((zoneid = sin6->sin6_scope_id) == 0 && defaultok) @@ -351,15 +350,11 @@ sa6_embedscope(struct sockaddr_in6 *sin6, int defaultok) * zone IDs assuming a one-to-one mapping between interfaces * and links. */ - if (V_if_index < zoneid) - return (ENXIO); - ifp = ifnet_byindex(zoneid); - if (ifp == NULL) /* XXX: this can happen for some OS */ + if (V_if_index < zoneid || ifnet_byindex(zoneid) == NULL) return (ENXIO); /* XXX assignment to 16bit from 32bit variable */ sin6->sin6_addr.s6_addr16[1] = htons(zoneid & 0xffff); - sin6->sin6_scope_id = 0; } |