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.
This commit is contained in:
bz 2009-06-10 09:07:05 +00:00
parent ddb9834c3c
commit f5e2381b7d
4 changed files with 13 additions and 4 deletions

View File

@ -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)))

View File

@ -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);

View File

@ -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);

View File

@ -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;