diff options
author | bz <bz@FreeBSD.org> | 2009-06-10 09:07:05 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-06-10 09:07:05 +0000 |
commit | f5e2381b7d5343afbd217577f932b65b89253433 (patch) | |
tree | 5d608442c4939c3dfdf043dd503c1c7df2c6f33a /sys/net/if_fddisubr.c | |
parent | ddb9834c3c59bcc9abdda53584a7676e799b99e2 (diff) | |
download | FreeBSD-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/if_fddisubr.c')
-rw-r--r-- | sys/net/if_fddisubr.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |