aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2022-04-19 12:36:17 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2022-04-19 12:45:57 +0000
commitb338b1fd500a70726829e38c6eaf7ed31ab0e9f0 (patch)
treecb8bb084aa7fd393fc6ecf13cca13c09c28d171f
parentc5c981d4437b382c136cd7cc3d61abfea58f7d24 (diff)
tcp: plug set-but-not-used vars
Sponsored by: Rubicon Communications, LLC ("Netgate")
-rw-r--r--sys/netinet/tcp_usrreq.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 8c8cba8ea5ad..e559d8f1fe76 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -301,7 +301,9 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
{
int error = 0;
struct inpcb *inp;
+#ifdef KDTRACE_HOOKS
struct tcpcb *tp = NULL;
+#endif
struct sockaddr_in *sinp;
sinp = (struct sockaddr_in *)nam;
@@ -333,7 +335,9 @@ tcp_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
error = EINVAL;
goto out;
}
+#ifdef KDTRACE_HOOKS
tp = intotcpcb(inp);
+#endif
TCPDEBUG1();
INP_HASH_WLOCK(&V_tcbinfo);
error = in_pcbbind(inp, nam, td->td_ucred);
@@ -353,7 +357,9 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
{
int error = 0;
struct inpcb *inp;
+#ifdef KDTRACE_HOOKS
struct tcpcb *tp = NULL;
+#endif
struct sockaddr_in6 *sin6;
u_char vflagsav;
@@ -379,7 +385,9 @@ tcp6_usr_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
error = EINVAL;
goto out;
}
+#ifdef KDTRACE_HOOKS
tp = intotcpcb(inp);
+#endif
TCPDEBUG1();
INP_HASH_WLOCK(&V_tcbinfo);
inp->inp_vflag &= ~INP_IPV4;
@@ -792,7 +800,9 @@ tcp_usr_accept(struct socket *so, struct sockaddr **nam)
{
int error = 0;
struct inpcb *inp = NULL;
+#ifdef KDTRACE_HOOKS
struct tcpcb *tp = NULL;
+#endif
struct in_addr addr;
in_port_t port = 0;
TCPDEBUG0;
@@ -807,7 +817,9 @@ tcp_usr_accept(struct socket *so, struct sockaddr **nam)
error = ECONNABORTED;
goto out;
}
+#ifdef KDTRACE_HOOKS
tp = intotcpcb(inp);
+#endif
TCPDEBUG1();
/*
@@ -834,7 +846,9 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam)
{
struct inpcb *inp = NULL;
int error = 0;
+#ifdef KDTRACE_HOOKS
struct tcpcb *tp = NULL;
+#endif
struct in_addr addr;
struct in6_addr addr6;
struct epoch_tracker et;
@@ -853,7 +867,9 @@ tcp6_usr_accept(struct socket *so, struct sockaddr **nam)
error = ECONNABORTED;
goto out;
}
+#ifdef KDTRACE_HOOKS
tp = intotcpcb(inp);
+#endif
TCPDEBUG1();
/*