diff options
| author | joerg <joerg@NetBSD.org> | 2014-11-22 00:17:07 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2014-11-22 00:17:07 +0000 |
| commit | 071cb9f7b6b460f896ec9a35ed4ce384d76d577e (patch) | |
| tree | 5a5a3038cad6f85435ec9c48fcb5ccd2f00a455f /sys/dev | |
| parent | 6755f11efa061444ae316f0082401e903db0ef24 (diff) | |
Drop unnecessary-but-harmful casts.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/rtl8169.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ic/rtl8169.c b/sys/dev/ic/rtl8169.c index 87468bdc76b..ae269168b98 100644 --- a/sys/dev/ic/rtl8169.c +++ b/sys/dev/ic/rtl8169.c @@ -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" |
