mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-26 08:02:51 +00:00
Using a negated unsigned value as func. arg. fails for Keil C166 compilers.
This commit is contained in:
parent
7ece19c474
commit
090b4087fc
@ -61,7 +61,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
|||||||
|
|
||||||
iphdr = p->payload;
|
iphdr = p->payload;
|
||||||
hlen = IPH_HL(iphdr) * 4;
|
hlen = IPH_HL(iphdr) * 4;
|
||||||
pbuf_header(p, -hlen);
|
pbuf_header(p, -((s16_t)hlen));
|
||||||
|
|
||||||
type = *((u8_t *)p->payload);
|
type = *((u8_t *)p->payload);
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
iphdr = p->payload;
|
iphdr = p->payload;
|
||||||
tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4);
|
tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4);
|
||||||
|
|
||||||
pbuf_header(p, -(IPH_HL(iphdr) * 4));
|
pbuf_header(p, -((s16_t)(IPH_HL(iphdr) * 4)));
|
||||||
|
|
||||||
/* Don't even process incoming broadcasts/multicasts. */
|
/* Don't even process incoming broadcasts/multicasts. */
|
||||||
if(ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask)) ||
|
if(ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask)) ||
|
||||||
@ -116,7 +116,6 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Verify TCP checksum. */
|
/* Verify TCP checksum. */
|
||||||
if(inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src),
|
if(inet_chksum_pseudo(p, (struct ip_addr *)&(iphdr->src),
|
||||||
(struct ip_addr *)&(iphdr->dest),
|
(struct ip_addr *)&(iphdr->dest),
|
||||||
|
@ -171,7 +171,7 @@ udp_input(struct pbuf *p, struct netif *inp)
|
|||||||
|
|
||||||
iphdr = p->payload;
|
iphdr = p->payload;
|
||||||
|
|
||||||
pbuf_header(p, -(UDP_HLEN + IPH_HL(iphdr) * 4));
|
pbuf_header(p, -((s16_t)(UDP_HLEN + IPH_HL(iphdr) * 4)));
|
||||||
|
|
||||||
udphdr = (struct udp_hdr *)((u8_t *)p->payload - UDP_HLEN);
|
udphdr = (struct udp_hdr *)((u8_t *)p->payload - UDP_HLEN);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user