diff options
author | dg <dg@FreeBSD.org> | 1994-12-30 06:46:21 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1994-12-30 06:46:21 +0000 |
commit | 911a1abecea24d45887966c057d21df949527ec2 (patch) | |
tree | df62d5a187ef3fe7b24811f249e0f2aefe4e1a2d /sys/net | |
parent | 566a3ed4e692ab1c47aa5269ac09fb09c3848f31 (diff) | |
download | FreeBSD-src-911a1abecea24d45887966c057d21df949527ec2.zip FreeBSD-src-911a1abecea24d45887966c057d21df949527ec2.tar.gz |
Moved declaration of ifnet pointer out of the header file and into the
.c file where it belongs. Bezeroed some uninitialized malloc data.
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 4 | ||||
-rw-r--r-- | sys/net/if.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 31c53ed..b4ca79f 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $Id: if.c,v 1.10 1994/11/10 18:49:23 guido Exp $ + * $Id: if.c,v 1.11 1994/12/21 22:56:58 wollman Exp $ */ #include <sys/param.h> @@ -52,6 +52,7 @@ #include <ether.h> int ifqmaxlen = IFQ_MAXLEN; +struct ifnet *ifnet; /* * Network interface utility routines. @@ -115,6 +116,7 @@ if_attach(ifp) unsigned n = (if_indexlim <<= 1) * sizeof(ifa); struct ifaddr **q = (struct ifaddr **) malloc(n, M_IFADDR, M_WAITOK); + bzero((caddr_t)q, n); if (ifnet_addrs) { bcopy((caddr_t)ifnet_addrs, (caddr_t)q, n/2); free((caddr_t)ifnet_addrs, M_IFADDR); diff --git a/sys/net/if.h b/sys/net/if.h index 53914f2..6d733b1 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.h 8.1 (Berkeley) 6/10/93 - * $Id: if.h,v 1.13 1994/12/21 22:56:59 wollman Exp $ + * $Id: if.h,v 1.14 1994/12/22 07:20:03 davidg Exp $ */ #ifndef _NET_IF_H_ @@ -349,7 +349,7 @@ struct ifconf { else \ (ifa)->ifa_refcnt--; -struct ifnet *ifnet; +extern struct ifnet *ifnet; void ether_ifattach __P((struct ifnet *)); void ether_input __P((struct ifnet *, struct ether_header *, struct mbuf *)); |