From f3c8a935a4aa7a03a4e8366cca431544aa959b41 Mon Sep 17 00:00:00 2001 From: glebius Date: Fri, 4 Sep 2015 12:02:12 +0000 Subject: [PATCH] Make tcp_mtudisc() static and void. No functional changes. Sponsored by: Nginx, Inc. --- sys/netinet/tcp_subr.c | 9 +++++---- sys/netinet/tcp_var.h | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 6face4e96533..207ad0312c34 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -228,6 +228,7 @@ VNET_DEFINE(struct hhook_head *, tcp_hhh[HHOOK_TCP_LAST+1]); static struct inpcb *tcp_notify(struct inpcb *, int); static struct inpcb *tcp_mtudisc_notify(struct inpcb *, int); +static void tcp_mtudisc(struct inpcb *, int); static char * tcp_log_addr(struct in_conninfo *inc, struct tcphdr *th, void *ip4hdr, const void *ip6hdr); static void tcp_timer_discard(struct tcpcb *, uint32_t); @@ -1811,10 +1812,11 @@ static struct inpcb * tcp_mtudisc_notify(struct inpcb *inp, int error) { - return (tcp_mtudisc(inp, -1)); + tcp_mtudisc(inp, -1); + return (inp); } -struct inpcb * +static void tcp_mtudisc(struct inpcb *inp, int mtuoffer) { struct tcpcb *tp; @@ -1823,7 +1825,7 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer) INP_WLOCK_ASSERT(inp); if ((inp->inp_flags & INP_TIMEWAIT) || (inp->inp_flags & INP_DROPPED)) - return (inp); + return; tp = intotcpcb(inp); KASSERT(tp != NULL, ("tcp_mtudisc: tp == NULL")); @@ -1845,7 +1847,6 @@ tcp_mtudisc(struct inpcb *inp, int mtuoffer) if (tp->t_flags & TF_SACK_PERMIT) EXIT_FASTRECOVERY(tp->t_flags); tcp_output(tp); - return (inp); } #ifdef INET diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index d16f27b0f379..e0a6ed142f0a 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -687,8 +687,6 @@ void tcp_mss(struct tcpcb *, int); int tcp_mssopt(struct in_conninfo *); struct inpcb * tcp_drop_syn_sent(struct inpcb *, int); -struct inpcb * - tcp_mtudisc(struct inpcb *, int); struct tcpcb * tcp_newtcpcb(struct inpcb *); int tcp_output(struct tcpcb *);