Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet Guard use of "so" in tcp_timer_persist() and tcp...



details:   https://anonhg.NetBSD.org/src/rev/ec62003d2634
branches:  trunk
changeset: 538519:ec62003d2634
user:      simonb <simonb%NetBSD.org@localhost>
date:      Tue Oct 22 03:11:03 2002 +0000

description:
Guard use of "so" in tcp_timer_persist() and tcp_timer_2msl() with
#ifdef TCP_DEBUG.

diffstat:

 sys/netinet/tcp_timer.c |  16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diffs (79 lines):

diff -r bf61b20de9a8 -r ec62003d2634 sys/netinet/tcp_timer.c
--- a/sys/netinet/tcp_timer.c   Tue Oct 22 03:07:06 2002 +0000
+++ b/sys/netinet/tcp_timer.c   Tue Oct 22 03:11:03 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_timer.c,v 1.59 2002/06/09 16:33:44 itojun Exp $    */
+/*     $NetBSD: tcp_timer.c,v 1.60 2002/10/22 03:11:03 simonb Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_timer.c,v 1.59 2002/06/09 16:33:44 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_timer.c,v 1.60 2002/10/22 03:11:03 simonb Exp $");
 
 #include "opt_inet.h"
 #include "opt_tcp_debug.h"
@@ -408,10 +408,10 @@
 tcp_timer_persist(void *arg)
 {
        struct tcpcb *tp = arg;
-       struct socket *so;
        uint32_t rto;
        int s;
 #ifdef TCP_DEBUG
+       struct socket *so;
        short ostate;
 #endif
 
@@ -419,6 +419,7 @@
 
        callout_deactivate(&tp->t_timer[TCPT_PERSIST]);
 
+#ifdef TCP_DEBUG
 #ifdef INET
        if (tp->t_inpcb)
                so = tp->t_inpcb->inp_socket;
@@ -428,9 +429,8 @@
                so = tp->t_in6pcb->in6p_socket;
 #endif
 
-#ifdef TCP_DEBUG
        ostate = tp->t_state;
-#endif
+#endif /* TCP_DEBUG */
 
        /*
         * Persistance timer into zero window.
@@ -557,9 +557,9 @@
 tcp_timer_2msl(void *arg)
 {
        struct tcpcb *tp = arg;
-       struct socket *so;
        int s;
 #ifdef TCP_DEBUG
+       struct socket *so;
        short ostate;
 #endif
 
@@ -567,6 +567,7 @@
 
        callout_deactivate(&tp->t_timer[TCPT_2MSL]);
 
+#ifdef TCP_DEBUG
 #ifdef INET
        if (tp->t_inpcb)
                so = tp->t_inpcb->inp_socket;
@@ -576,9 +577,8 @@
                so = tp->t_in6pcb->in6p_socket;
 #endif
 
-#ifdef TCP_DEBUG
        ostate = tp->t_state;
-#endif
+#endif /* TCP_DEBUG */
 
        /*
         * 2 MSL timeout in shutdown went off.  If we're closed but



Home | Main Index | Thread Index | Old Index