Drop unnecessary-but-harmful casts.
This commit is contained in:
parent
c1bb8c29b0
commit
295c2661e0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtl8169.c,v 1.142 2014/10/14 00:56:48 uwe Exp $ */
|
||||
/* $NetBSD: rtl8169.c,v 1.143 2014/11/22 00:17:07 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998-2003
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.142 2014/10/14 00:56:48 uwe Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.143 2014/11/22 00:17:07 joerg Exp $");
|
||||
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
|
||||
|
||||
/*
|
||||
@ -454,8 +454,8 @@ re_diag(struct rtk_softc *sc)
|
||||
/* Put some data in the mbuf */
|
||||
|
||||
eh = mtod(m0, struct ether_header *);
|
||||
memcpy(eh->ether_dhost, (char *)&dst, ETHER_ADDR_LEN);
|
||||
memcpy(eh->ether_shost, (char *)&src, ETHER_ADDR_LEN);
|
||||
memcpy(eh->ether_dhost, &dst, ETHER_ADDR_LEN);
|
||||
memcpy(eh->ether_shost, &src, ETHER_ADDR_LEN);
|
||||
eh->ether_type = htons(ETHERTYPE_IP);
|
||||
m0->m_pkthdr.len = m0->m_len = ETHER_MIN_LEN - ETHER_CRC_LEN;
|
||||
|
||||
@ -517,8 +517,8 @@ re_diag(struct rtk_softc *sc)
|
||||
|
||||
/* Test that the received packet data matches what we sent. */
|
||||
|
||||
if (memcmp((char *)&eh->ether_dhost, (char *)&dst, ETHER_ADDR_LEN) ||
|
||||
memcmp((char *)&eh->ether_shost, (char *)&src, ETHER_ADDR_LEN) ||
|
||||
if (memcmp(&eh->ether_dhost, &dst, ETHER_ADDR_LEN) ||
|
||||
memcmp(&eh->ether_shost, &src, ETHER_ADDR_LEN) ||
|
||||
ntohs(eh->ether_type) != ETHERTYPE_IP) {
|
||||
aprint_error_dev(sc->sc_dev, "WARNING, DMA FAILURE!\n"
|
||||
"expected TX data: %s/%s/0x%x\n"
|
||||
|
Loading…
x
Reference in New Issue
Block a user