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 "ostate" with #ifdef TCP_DEBUG in t...



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

description:
Guard use of "ostate" with #ifdef TCP_DEBUG in tcp_usrreq().
Don't put semicolons at the end of "#define token value".

diffstat:

 sys/netinet/tcp_usrreq.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (67 lines):

diff -r ec62003d2634 -r a95e346f42bd sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c  Tue Oct 22 03:11:03 2002 +0000
+++ b/sys/netinet/tcp_usrreq.c  Tue Oct 22 03:14:16 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_usrreq.c,v 1.73 2002/07/03 21:36:58 thorpej Exp $  */
+/*     $NetBSD: tcp_usrreq.c,v 1.74 2002/10/22 03:14:16 simonb Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.73 2002/07/03 21:36:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.74 2002/10/22 03:14:16 simonb Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -180,7 +180,9 @@
        struct tcpcb *tp = NULL;
        int s;
        int error = 0;
-       int ostate;
+#ifdef TCP_DEBUG
+       int ostate = 0;
+#endif
        int family;     /* family of the socket */
 
        family = so->so_proto->pr_domain->dom_family;
@@ -274,7 +276,9 @@
 #ifdef KPROF
                tcp_acounts[tp->t_state][req]++;
 #endif
+#ifdef TCP_DEBUG
                ostate = tp->t_state;
+#endif
        }
 #endif
 #ifdef INET6
@@ -284,11 +288,11 @@
 #ifdef KPROF
                tcp_acounts[tp->t_state][req]++;
 #endif
+#ifdef TCP_DEBUG
                ostate = tp->t_state;
+#endif
        }
 #endif
-       else
-               ostate = 0;
 
        switch (req) {
 
@@ -734,11 +738,11 @@
 }
 
 #ifndef TCP_SENDSPACE
-#define        TCP_SENDSPACE   1024*16;
+#define        TCP_SENDSPACE   1024*16
 #endif
 int    tcp_sendspace = TCP_SENDSPACE;
 #ifndef TCP_RECVSPACE
-#define        TCP_RECVSPACE   1024*16;
+#define        TCP_RECVSPACE   1024*16
 #endif
 int    tcp_recvspace = TCP_RECVSPACE;
 



Home | Main Index | Thread Index | Old Index