aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2011-04-30 11:21:29 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2011-04-30 11:21:29 +0000
commitb287c6c70cd41c6805ade3f16b073028c5ccd836 (patch)
tree323517c1065faea8844fb601613c16c72f091e61 /sys/netinet/tcp_output.c
parente6194c2ed4c3fe69ba25a005d1b8b387d1ce982f (diff)
downloadsrc-b287c6c70cd41c6805ade3f16b073028c5ccd836.tar.gz
src-b287c6c70cd41c6805ade3f16b073028c5ccd836.zip
Make the TCP code compile without INET. Sort #includes and add #ifdef INETs.
Add some comments at #endifs given more nestedness. To make the compiler happy, some default initializations were added in accordance with the style on the files. Reviewed by: gnn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 4 days
Notes
Notes: svn path=/head/; revision=221250
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index f6488a36090f..3ccb61a22332 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -173,7 +173,7 @@ tcp_output(struct tcpcb *tp)
{
struct socket *so = tp->t_inpcb->inp_socket;
long len, recwin, sendwin;
- int off, flags, error;
+ int off, flags, error = 0; /* Keep compiler happy */
struct mbuf *m;
struct ip *ip = NULL;
struct ipovly *ipov = NULL;
@@ -659,7 +659,7 @@ send:
hdrlen = sizeof (struct ip6_hdr) + sizeof (struct tcphdr);
else
#endif
- hdrlen = sizeof (struct tcpiphdr);
+ hdrlen = sizeof (struct tcpiphdr);
/*
* Compute options for segment.
@@ -866,7 +866,7 @@ send:
goto out;
}
}
-#endif
+#endif /* notyet */
/*
* If we're sending everything we've got, set PUSH.
* (This will keep happy those implementations which only
@@ -1189,7 +1189,7 @@ timer:
#endif
ipov->ih_len = save;
}
-#endif
+#endif /* TCPDEBUG */
/*
* Fill in IP length and desired time to live and
@@ -1216,8 +1216,12 @@ timer:
tp->t_inpcb->in6p_outputopts, NULL,
((so->so_options & SO_DONTROUTE) ?
IP_ROUTETOIF : 0), NULL, NULL, tp->t_inpcb);
- } else
+ }
#endif /* INET6 */
+#if defined(INET) && defined(INET6)
+ else
+#endif
+#ifdef INET
{
ip->ip_len = m->m_pkthdr.len;
#ifdef INET6
@@ -1239,6 +1243,7 @@ timer:
((so->so_options & SO_DONTROUTE) ? IP_ROUTETOIF : 0), 0,
tp->t_inpcb);
}
+#endif /* INET */
if (error) {
/*