Module Name: src Committed By: joerg Date: Sat Nov 22 00:17:08 UTC 2014
Modified Files: src/sys/dev/ic: rtl8169.c Log Message: Drop unnecessary-but-harmful casts. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/sys/dev/ic/rtl8169.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/rtl8169.c diff -u src/sys/dev/ic/rtl8169.c:1.142 src/sys/dev/ic/rtl8169.c:1.143 --- src/sys/dev/ic/rtl8169.c:1.142 Tue Oct 14 00:56:48 2014 +++ src/sys/dev/ic/rtl8169.c Sat Nov 22 00:17:07 2014 @@ -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"