--- previous/src/slirp/ip_input.c 2018/04/24 19:30:44 1.1 +++ previous/src/slirp/ip_input.c 2018/04/24 19:34:35 1.1.1.3 @@ -44,7 +44,7 @@ #include #define container_of(ptr, type, member) ({ \ - const typeof(((type *) 0)->member) *__mptr = (ptr); \ + typeof(((type *) 0)->member) *__mptr = (ptr); \ (type *) ((char *) __mptr - offsetof(type, member));}) @@ -78,11 +78,11 @@ ip_input(m) struct mbuf *m; { register struct ip *ip; - int hlen; + u_int hlen; DEBUG_CALL("ip_input"); DEBUG_ARG("m = %lx", (long)m); - DEBUG_ARG("m_len = %d", m->m_len); + DEBUG_ARG("m_len = %zu", m->m_len); ipstat.ips_total++; @@ -140,7 +140,7 @@ ip_input(m) /* check ip_ttl for a correct ICMP reply */ if(ip->ip_ttl==0 || ip->ip_ttl==1) { - icmp_error(m, ICMP_TIMXCEED,ICMP_TIMXCEED_INTRANS, 0,"ttl"); + icmp_error(m, ICMP_TIMXCEED,ICMP_TIMXCEED_INTRANS, 0, "ttl"); goto bad; } @@ -245,7 +245,7 @@ bad: * reassembly of this datagram already exists, then it * is given as fp; otherwise have to make a chain. */ -static struct ip * +struct ip * ip_reass(register struct ip *ip, register struct ipq *fp) { register struct mbuf *m = dtom(ip); @@ -373,7 +373,7 @@ insert: */ if (m->m_flags & M_EXT) { int delta; - delta = (char *)ip - m->m_dat; + delta = (char *)q - m->m_dat; q = (struct ipasfrag *)(m->m_ext + delta); }