mirror of
https://git.codelinaro.org/clo/qsdk/oss/boot/u-boot-2016.git
synced 2026-03-11 19:48:59 +01:00
net: Change for loop to memset()
This is intended purely as a code size reduction. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8c6914f10f
commit
ed1ada712a
1 changed files with 2 additions and 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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue