summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2009-06-10 09:07:05 +0000
committerbz <bz@FreeBSD.org>2009-06-10 09:07:05 +0000
commitf5e2381b7d5343afbd217577f932b65b89253433 (patch)
tree5d608442c4939c3dfdf043dd503c1c7df2c6f33a /sys/net
parentddb9834c3c59bcc9abdda53584a7676e799b99e2 (diff)
downloadFreeBSD-src-f5e2381b7d5343afbd217577f932b65b89253433.zip
FreeBSD-src-f5e2381b7d5343afbd217577f932b65b89253433.tar.gz
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.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_arcsubr.c2
-rw-r--r--sys/net/if_fddisubr.c9
-rw-r--r--sys/net/if_fwsubr.c2
-rw-r--r--sys/net/if_iso88025subr.c4
4 files changed, 13 insertions, 4 deletions
diff --git a/sys/net/if_arcsubr.c b/sys/net/if_arcsubr.c
index bb3cac6..f11ff59 100644
--- a/sys/net/if_arcsubr.c
+++ b/sys/net/if_arcsubr.c
@@ -109,7 +109,9 @@ arc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
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)))
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 9074bff..de26928 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -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);
diff --git a/sys/net/if_fwsubr.c b/sys/net/if_fwsubr.c
index 4f30db4..d4dc457 100644
--- a/sys/net/if_fwsubr.c
+++ b/sys/net/if_fwsubr.c
@@ -88,7 +88,9 @@ firewire_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
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);
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index a6d25dc..dafc57d 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -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;
OpenPOWER on IntegriCloud