mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-01 04:12:07 +00:00
Use ip_addr_set_zero instead of memset(0)
This commit is contained in:
parent
24d823dae6
commit
435115d4fb
@ -308,7 +308,7 @@ autoip_start(struct netif *netif)
|
|||||||
("autoip_start(): could not allocate autoip\n"));
|
("autoip_start(): could not allocate autoip\n"));
|
||||||
return ERR_MEM;
|
return ERR_MEM;
|
||||||
}
|
}
|
||||||
memset( autoip, 0, sizeof(struct autoip));
|
memset(autoip, 0, sizeof(struct autoip));
|
||||||
/* store this AutoIP client in the netif */
|
/* store this AutoIP client in the netif */
|
||||||
netif->autoip = autoip;
|
netif->autoip = autoip;
|
||||||
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_start(): allocated autoip"));
|
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE, ("autoip_start(): allocated autoip"));
|
||||||
@ -316,7 +316,7 @@ autoip_start(struct netif *netif)
|
|||||||
autoip->state = AUTOIP_STATE_OFF;
|
autoip->state = AUTOIP_STATE_OFF;
|
||||||
autoip->ttw = 0;
|
autoip->ttw = 0;
|
||||||
autoip->sent_num = 0;
|
autoip->sent_num = 0;
|
||||||
memset(&autoip->llipaddr, 0, sizeof(ip_addr_t));
|
ip_addr_set_zero(&autoip->llipaddr);
|
||||||
autoip->lastconflict = 0;
|
autoip->lastconflict = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user