diff options
author | Simon Glass <sjg@chromium.org> | 2011-10-26 14:18:39 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-27 23:53:58 +0200 |
commit | ed1ada712aa206bfa51caf56f27659baa05623bf (patch) | |
tree | 20e643f4d49162bd66c88a069d89c4fcccc90698 /net/net.c | |
parent | 8c6914f10f317af06012f038565270e356fddadd (diff) | |
download | u-boot-imx-ed1ada712aa206bfa51caf56f27659baa05623bf.zip u-boot-imx-ed1ada712aa206bfa51caf56f27659baa05623bf.tar.gz u-boot-imx-ed1ada712aa206bfa51caf56f27659baa05623bf.tar.bz2 |
net: Change for loop to memset()
This is intended purely as a code size reduction.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -246,7 +246,6 @@ int NetArpWaitTry; void ArpRequest(void) { - int i; volatile uchar *pkt; ARP_t *arp; @@ -268,11 +267,8 @@ void ArpRequest(void) memcpy(&arp->ar_data[0], NetOurEther, 6); /* source IP addr */ NetWriteIP((uchar *) &arp->ar_data[6], NetOurIP); - for (i = 10; i < 16; ++i) { - /* dest ET addr = 0 */ - arp->ar_data[i] = 0; - } - + /* dest ET addr = 0 */ + memset(&arp->ar_data[10], '\0', 6); if ((NetArpWaitPacketIP & NetOurSubnetMask) != (NetOurIP & NetOurSubnetMask)) { if (NetOurGatewayIP == 0) { |