mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 18:14:53 +00:00
sizeof(u8_t) is 1 at temperatures > 0 K
This commit is contained in:
parent
ef68392388
commit
156d2c866f
@ -64,7 +64,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
|
||||
|
||||
|
||||
iphdr = p->payload;
|
||||
hlen = IPH_HL(iphdr) * 4/sizeof(u8_t);
|
||||
hlen = IPH_HL(iphdr) * 4;
|
||||
pbuf_header(p, -hlen);
|
||||
|
||||
type = *((u8_t *)p->payload);
|
||||
|
@ -332,7 +332,7 @@ ip_input(struct pbuf *p, struct netif *inp) {
|
||||
node (as recommended by RFC 1542 section 3.1.1, referred by RFC
|
||||
2131). */
|
||||
if(IPH_PROTO(iphdr) == IP_PROTO_UDP &&
|
||||
((struct udp_hdr *)((u8_t *)iphdr + IPH_HL(iphdr) * 4/sizeof(u8_t)))->src ==
|
||||
((struct udp_hdr *)((u8_t *)iphdr + IPH_HL(iphdr) * 4))->src ==
|
||||
DHCP_SERVER_PORT) {
|
||||
netif = inp;
|
||||
}
|
||||
@ -563,7 +563,7 @@ ip_debug_print(struct pbuf *p)
|
||||
struct ip_hdr *iphdr = p->payload;
|
||||
u8_t *payload;
|
||||
|
||||
payload = (u8_t *)iphdr + IP_HLEN/sizeof(u8_t);
|
||||
payload = (u8_t *)iphdr + IP_HLEN;
|
||||
|
||||
DEBUGF(IP_DEBUG, ("IP header:\n"));
|
||||
DEBUGF(IP_DEBUG, ("+-------------------------------+\n"));
|
||||
|
@ -445,7 +445,7 @@ pbuf_header(struct pbuf *p, s16_t header_size)
|
||||
}
|
||||
|
||||
payload = p->payload;
|
||||
p->payload = (u8_t *)p->payload - header_size/sizeof(u8_t);
|
||||
p->payload = (u8_t *)p->payload - header_size;
|
||||
|
||||
DEBUGF(PBUF_DEBUG, ("pbuf_header: old %p new %p (%d)\n", payload, p->payload, header_size));
|
||||
|
||||
|
@ -106,9 +106,9 @@ tcp_input(struct pbuf *p, struct netif *inp)
|
||||
#endif /* TCP_STATS */
|
||||
|
||||
iphdr = p->payload;
|
||||
tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4/sizeof(u8_t));
|
||||
tcphdr = (struct tcp_hdr *)((u8_t *)p->payload + IPH_HL(iphdr) * 4);
|
||||
|
||||
pbuf_header(p, -(IPH_HL(iphdr) * 4/sizeof(u8_t)));
|
||||
pbuf_header(p, -(IPH_HL(iphdr) * 4));
|
||||
|
||||
/* Don't even process incoming broadcasts/multicasts. */
|
||||
if(ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask)) ||
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
* Author: Adam Dunkels <adam@sics.se>
|
||||
*
|
||||
* $Id: udp.c,v 1.5 2002/12/18 12:49:02 jani Exp $
|
||||
* $Id: udp.c,v 1.6 2002/12/19 09:04:58 jani Exp $
|
||||
*/
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
@ -94,7 +94,7 @@ udp_lookup(struct ip_hdr *iphdr, struct netif *inp)
|
||||
|
||||
PERF_START;
|
||||
|
||||
udphdr = (struct udp_hdr *)(u8_t *)iphdr + IPH_HL(iphdr) * 4/sizeof(u8_t);
|
||||
udphdr = (struct udp_hdr *)(u8_t *)iphdr + IPH_HL(iphdr) * 4;
|
||||
|
||||
src = NTOHS(udphdr->src);
|
||||
dest = NTOHS(udphdr->dest);
|
||||
|
Loading…
Reference in New Issue
Block a user