From 8c6ac8eb59eddb55234170c02b43c24f01cacaf5 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 18 Jan 2017 13:21:11 +0100 Subject: [PATCH] Optimize my last fix in etharp.c, I missed the variable declaration at the beginning of the function (cherry picked from commit 7aaa888d1d27e4adb45c7ebdf5ed9bd42cc9812f) --- src/core/ipv4/etharp.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/core/ipv4/etharp.c b/src/core/ipv4/etharp.c index 88bc1dd6..35af8559 100644 --- a/src/core/ipv4/etharp.c +++ b/src/core/ipv4/etharp.c @@ -699,11 +699,7 @@ etharp_input(struct pbuf *p, struct netif *netif) LWIP_DEBUGF (ETHARP_DEBUG | LWIP_DBG_TRACE, ("etharp_input: incoming ARP request\n")); /* ARP request for our address? */ if (for_us) { - ip4_addr_t sipaddr; - - /* Need an aligned copy of source IP */ - IPADDR2_COPY(&sipaddr.addr, &hdr->sipaddr); - + /* send ARP response */ etharp_raw(netif, (struct eth_addr *)netif->hwaddr, &hdr->dhwaddr, (struct eth_addr *)netif->hwaddr, netif_ip4_addr(netif),