From owner-svn-src-head@FreeBSD.ORG Wed Jan 9 18:54:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3CA46EA5; Wed, 9 Jan 2013 18:54:59 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2F348717; Wed, 9 Jan 2013 18:54:59 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r09IsxT5085547; Wed, 9 Jan 2013 18:54:59 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r09IsxIb085546; Wed, 9 Jan 2013 18:54:59 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201301091854.r09IsxIb085546@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 9 Jan 2013 18:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245233 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2013 18:54:59 -0000 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; }