From 64760eb06ef3920c0601cee046c2016b500a7654 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Thu, 23 Oct 2003 15:09:34 +0000 Subject: Merge from p4 (noticed these changes with DES' if_ethersubr.c changes caused a minor conflict): o Use ETHER_ADDR_LEN in preference to '6'. o Remove two unnecessary (caddr_t) casts. One of them causes problems in my tree where etherbroadcastaddr is const, and (caddr_t) casts the const away. --- sys/net/if_ethersubr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/net/if_ethersubr.c') diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 2e6e24e8ed86..4e0e5cb6ade1 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -138,7 +138,7 @@ ether_output(struct ifnet *ifp, struct mbuf *m, { short type; int error = 0, hdrcmplt = 0; - u_char esrc[6], edst[6]; + u_char esrc[ETHER_ADDR_LEN], edst[ETHER_ADDR_LEN]; struct rtentry *rt; struct ether_header *eh; int loop_copy = 0; @@ -651,8 +651,8 @@ ether_demux(struct ifnet *ifp, struct mbuf *m) return; } if (ETHER_IS_MULTICAST(eh->ether_dhost)) { - if (bcmp((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost, - sizeof(etherbroadcastaddr)) == 0) + if (bcmp(etherbroadcastaddr, eh->ether_dhost, + sizeof(etherbroadcastaddr)) == 0) m->m_flags |= M_BCAST; else m->m_flags |= M_MCAST; -- cgit v1.2.3