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:
Guillaume Subiron 2016-03-15 10:31:21 +01:00 committed by Samuel Thibault
parent 9dfbf250d2
commit 1252cf40a8
3 changed files with 87 additions and 88 deletions

View File

@ -258,9 +258,9 @@ tcp_input(struct mbuf *m, int iphlen, struct socket *inso, unsigned short af)
switch (af) { switch (af) {
case AF_INET: case AF_INET:
if (iphlen > sizeof(struct ip )) { if (iphlen > sizeof(struct ip)) {
ip_stripoptions(m, (struct mbuf *)0); ip_stripoptions(m, (struct mbuf *)0);
iphlen=sizeof(struct ip ); iphlen = sizeof(struct ip);
} }
/* XXX Check if too short */ /* 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 * Save a copy of the IP header in case we want restore it
* for sending an ICMP error message in response. * for sending an ICMP error message in response.
*/ */
ip=mtod(m, struct ip *); ip = mtod(m, struct ip *);
save_ip = *ip; save_ip = *ip;
save_ip.ip_len+= iphlen; save_ip.ip_len += iphlen;
/* /*
* Get IP and TCP header together in first mbuf. * 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_pr = save_ip.ip_p;
ti->ti_len = htons((uint16_t)tlen); ti->ti_len = htons((uint16_t)tlen);
len = ((sizeof(struct tcpiphdr) - sizeof(struct tcphdr)) + tlen); len = ((sizeof(struct tcpiphdr) - sizeof(struct tcphdr)) + tlen);
if(cksum(m, len)) { if (cksum(m, len)) {
goto drop; goto drop;
} }
break; break;
@ -649,7 +649,7 @@ findso:
- sizeof(struct tcphdr); - sizeof(struct tcphdr);
m->m_len -= sizeof(struct tcpiphdr) - sizeof(struct ip) m->m_len -= sizeof(struct tcpiphdr) - sizeof(struct ip)
- sizeof(struct tcphdr); - sizeof(struct tcphdr);
*ip=save_ip; *ip = save_ip;
icmp_send_error(m, ICMP_UNREACH, code, 0, strerror(errno)); icmp_send_error(m, ICMP_UNREACH, code, 0, strerror(errno));
break; break;
default: default:

View File

@ -465,7 +465,6 @@ send:
ip->ip_ttl = IPDEFTTL; ip->ip_ttl = IPDEFTTL;
ip->ip_tos = so->so_iptos; ip->ip_tos = so->so_iptos;
error = ip_output(so, m); error = ip_output(so, m);
break; break;