From owner-svn-src-head@FreeBSD.ORG Wed Jun 10 09:07:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D337D1065791; Wed, 10 Jun 2009 09:07:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A73878FC0A; Wed, 10 Jun 2009 09:07:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5A9757l099469; Wed, 10 Jun 2009 09:07:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5A975uQ099464; Wed, 10 Jun 2009 09:07:05 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200906100907.n5A975uQ099464@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 10 Jun 2009 09:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r193891 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 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, 10 Jun 2009 09:07:06 -0000 Author: bz Date: Wed Jun 10 09:07:05 2009 New Revision: 193891 URL: http://svn.freebsd.org/changeset/base/193891 Log: The llentry *lle is only used in cases of INET or INET6. Put the variable declaration under proper #ifdefs. In case variables are only needed for one of the two AFs more them into proper scope. Modified: head/sys/net/if_arcsubr.c head/sys/net/if_fddisubr.c head/sys/net/if_fwsubr.c head/sys/net/if_iso88025subr.c Modified: head/sys/net/if_arcsubr.c ============================================================================== --- head/sys/net/if_arcsubr.c Wed Jun 10 09:06:42 2009 (r193890) +++ head/sys/net/if_arcsubr.c Wed Jun 10 09:07:05 2009 (r193891) @@ -109,7 +109,9 @@ arc_output(struct ifnet *ifp, struct mbu u_int8_t atype, adst; int loop_copy = 0; int isphds; +#if defined(INET) || defined(INET6) struct llentry *lle; +#endif if (!((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING))) Modified: head/sys/net/if_fddisubr.c ============================================================================== --- head/sys/net/if_fddisubr.c Wed Jun 10 09:06:42 2009 (r193890) +++ head/sys/net/if_fddisubr.c Wed Jun 10 09:07:05 2009 (r193891) @@ -120,11 +120,10 @@ fddi_output(ifp, m, dst, ro) int loop_copy = 0, error = 0, hdrcmplt = 0; u_char esrc[FDDI_ADDR_LEN], edst[FDDI_ADDR_LEN]; struct fddi_header *fh; +#if defined(INET) || defined(INET6) struct llentry *lle; - struct rtentry *rt0 = NULL; +#endif - if (ro != NULL) - rt0 = ro->ro_rt; #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); if (error) @@ -141,6 +140,10 @@ fddi_output(ifp, m, dst, ro) switch (dst->sa_family) { #ifdef INET case AF_INET: { + struct rtentry *rt0 = NULL; + + if (ro != NULL) + rt0 = ro->ro_rt; error = arpresolve(ifp, rt0, m, dst, edst, &lle); if (error) return (error == EWOULDBLOCK ? 0 : error); Modified: head/sys/net/if_fwsubr.c ============================================================================== --- head/sys/net/if_fwsubr.c Wed Jun 10 09:06:42 2009 (r193890) +++ head/sys/net/if_fwsubr.c Wed Jun 10 09:07:05 2009 (r193891) @@ -88,7 +88,9 @@ firewire_output(struct ifnet *ifp, struc struct mbuf *mtail; int unicast, dgl, foff; static int next_dgl; +#if defined(INET) || defined(INET6) struct llentry *lle; +#endif #ifdef MAC error = mac_ifnet_check_transmit(ifp, m); Modified: head/sys/net/if_iso88025subr.c ============================================================================== --- head/sys/net/if_iso88025subr.c Wed Jun 10 09:06:42 2009 (r193890) +++ head/sys/net/if_iso88025subr.c Wed Jun 10 09:07:05 2009 (r193891) @@ -243,8 +243,10 @@ iso88025_output(ifp, m, dst, ro) struct iso88025_header *th; struct iso88025_header gen_th; struct sockaddr_dl *sdl = NULL; - struct llentry *lle; struct rtentry *rt0 = NULL; +#if defined(INET) || defined(INET6) + struct llentry *lle; +#endif if (ro != NULL) rt0 = ro->ro_rt;