Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2009 09:07:05 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193891 - head/sys/net
Message-ID:  <200906100907.n5A975uQ099464@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906100907.n5A975uQ099464>