fixed compiling icmp.c (variable has to be declared at the beginning of a scope)

This commit is contained in:
goldsimon 2015-04-22 11:29:35 +02:00
parent a6c3bb4c6d
commit a81c7bf04b

View File

@ -189,6 +189,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
if(pbuf_header(p, hlen)) {
LWIP_ASSERT("Can't move over header in packet", 0);
} else {
err_t ret;
iphdr = (struct ip_hdr*)p->payload;
ip4_addr_copy(iphdr->src, inp->ip_addr);
ip4_addr_copy(iphdr->dest, *ip4_current_src_addr());
@ -217,7 +218,6 @@ icmp_input(struct pbuf *p, struct netif *inp)
/* increase number of echo replies attempted to send */
snmp_inc_icmpoutechoreps();
err_t ret;
/* send an ICMP packet, src addr is the dest addr of the current packet */
ret = ip4_output_if(p, ip4_current_dest_addr(), IP_HDRINCL,
ICMP_TTL, 0, IP_PROTO_ICMP, inp);