sizeof(u8_t) is 1 at temperatures > 0 K

This commit is contained in:
jani
2002-12-19 09:04:58 +00:00
parent ef68392388
commit 156d2c866f
5 changed files with 8 additions and 8 deletions

View File

@@ -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);

View File

@@ -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"));