slirp: Reindent after refactoring
No code change. Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
9dfbf250d2
commit
1252cf40a8
|
@ -258,9 +258,9 @@ tcp_input(struct mbuf *m, int iphlen, struct socket *inso, unsigned short af)
|
|||
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
if (iphlen > sizeof(struct ip )) {
|
||||
if (iphlen > sizeof(struct ip)) {
|
||||
ip_stripoptions(m, (struct mbuf *)0);
|
||||
iphlen=sizeof(struct ip );
|
||||
iphlen = sizeof(struct ip);
|
||||
}
|
||||
/* XXX Check if too short */
|
||||
|
||||
|
@ -269,9 +269,9 @@ tcp_input(struct mbuf *m, int iphlen, struct socket *inso, unsigned short af)
|
|||
* Save a copy of the IP header in case we want restore it
|
||||
* for sending an ICMP error message in response.
|
||||
*/
|
||||
ip=mtod(m, struct ip *);
|
||||
ip = mtod(m, struct ip *);
|
||||
save_ip = *ip;
|
||||
save_ip.ip_len+= iphlen;
|
||||
save_ip.ip_len += iphlen;
|
||||
|
||||
/*
|
||||
* Get IP and TCP header together in first mbuf.
|
||||
|
@ -296,7 +296,7 @@ tcp_input(struct mbuf *m, int iphlen, struct socket *inso, unsigned short af)
|
|||
ti->ti_pr = save_ip.ip_p;
|
||||
ti->ti_len = htons((uint16_t)tlen);
|
||||
len = ((sizeof(struct tcpiphdr) - sizeof(struct tcphdr)) + tlen);
|
||||
if(cksum(m, len)) {
|
||||
if (cksum(m, len)) {
|
||||
goto drop;
|
||||
}
|
||||
break;
|
||||
|
@ -649,7 +649,7 @@ findso:
|
|||
- sizeof(struct tcphdr);
|
||||
m->m_len -= sizeof(struct tcpiphdr) - sizeof(struct ip)
|
||||
- sizeof(struct tcphdr);
|
||||
*ip=save_ip;
|
||||
*ip = save_ip;
|
||||
icmp_send_error(m, ICMP_UNREACH, code, 0, strerror(errno));
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -465,7 +465,6 @@ send:
|
|||
|
||||
ip->ip_ttl = IPDEFTTL;
|
||||
ip->ip_tos = so->so_iptos;
|
||||
|
||||
error = ip_output(so, m);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue