mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-06-27 07:43:37 +08:00
Included patch #5920: Create define to override C-library memcpy. 2 Defines are created: MEMCPY() for normal memcpy, SMEMCPY() for situations where some compilers might inline the copy and save a function call. Also replaced all calls to memcpy() with calls to (S)MEMCPY().
This commit is contained in:
@@ -576,8 +576,8 @@ etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf *p)
|
||||
|
||||
/* Copy struct ip_addr2 to aligned ip_addr, to support compilers without
|
||||
* structure packing (not using structure copy which breaks strict-aliasing rules). */
|
||||
memcpy(&sipaddr, &hdr->sipaddr, sizeof(sipaddr));
|
||||
memcpy(&dipaddr, &hdr->dipaddr, sizeof(dipaddr));
|
||||
SMEMCPY(&sipaddr, &hdr->sipaddr, sizeof(sipaddr));
|
||||
SMEMCPY(&dipaddr, &hdr->dipaddr, sizeof(dipaddr));
|
||||
|
||||
/* this interface is not configured? */
|
||||
if (netif->ip_addr.addr == 0) {
|
||||
|
||||
Reference in New Issue
Block a user