Date: Wed, 9 Jan 2013 18:54:59 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245233 - head/sys/netinet6 Message-ID: <201301091854.r09IsxIb085546@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Wed Jan 9 18:54:58 2013 New Revision: 245233 URL: http://svnweb.freebsd.org/changeset/base/245233 Log: Remove unneeded variable. MFC after: 1 week Modified: head/sys/netinet6/scope6.c Modified: head/sys/netinet6/scope6.c ============================================================================== --- head/sys/netinet6/scope6.c Wed Jan 9 18:54:41 2013 (r245232) +++ head/sys/netinet6/scope6.c Wed Jan 9 18:54:58 2013 (r245233) @@ -336,7 +336,6 @@ scope6_addr2default(struct in6_addr *add 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 * 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301091854.r09IsxIb085546>