Date: Fri, 21 Apr 2006 21:28:11 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95829 for review Message-ID: <200604212128.k3LLSBmS001919@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95829 Change 95829 by imp@imp_hammer on 2006/04/21 21:27:19 SWAP16(constant) instead of (var) in a few more places. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#9 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#9 (text+ko) ==== @@ -236,7 +236,7 @@ static void CheckForNewPacket(ip_header_t *pHeader) { - unsigned short *pFrameType, *pArpOp; + unsigned short *pFrameType; unsigned i; char *pData; ip_header_t *pIpHeader; @@ -264,11 +264,9 @@ case PROTOCOL_ARP: - pArpOp = (unsigned short *) (pData + 20); p_ARP = (arp_header_t*)pData; - if (SWAP16(*pArpOp) == ARP_REPLY) { - + if (p_ARP->operation == SWAP16(ARP_REPLY)) { // check if new server info is available if ((!serverMACSet) && (!(p_memcmp((char*)p_ARP->sender_ip, @@ -279,12 +277,9 @@ p_memcpy((char*)serverMACAddr, (char*)p_ARP->sender_mac, 6); } - } - - if (SWAP16(*pArpOp) == ARP_REQUEST) { - + } else if (p_ARP->operation == SWAP16(ARP_REQUEST)) { // ARP REPLY operation - *pArpOp = SWAP16(ARP_REPLY); + p_ARP->operation = SWAP16(ARP_REPLY); // Fill the dest address and src address for (i = 0; i <6; i++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604212128.k3LLSBmS001919>