Module Name:    src
Committed By:   yamt
Date:           Mon Apr 25 22:12:43 UTC 2011

Modified Files:
        src/sys/netinet: tcp_input.c

Log Message:
tcp_input: simplify redundant assignment.  no functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.310 -r1.311 src/sys/netinet/tcp_input.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.310 src/sys/netinet/tcp_input.c:1.311
--- src/sys/netinet/tcp_input.c:1.310	Wed Apr 20 14:08:07 2011
+++ src/sys/netinet/tcp_input.c	Mon Apr 25 22:12:43 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.310 2011/04/20 14:08:07 wiz Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.311 2011/04/25 22:12:43 yamt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -145,7 +145,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.310 2011/04/20 14:08:07 wiz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.311 2011/04/25 22:12:43 yamt Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1006,7 +1006,8 @@
 	struct tcpcb *tp = 0;
 	int tiflags;
 	struct socket *so = NULL;
-	int todrop, dupseg, acked, ourfinisacked, needoutput = 0;
+	int todrop, acked, ourfinisacked, needoutput = 0;
+	bool dupseg;
 #ifdef TCP_DEBUG
 	short ostate = 0;
 #endif
@@ -1057,15 +1058,14 @@
 	 * Note: IP leaves IP header in first mbuf.
 	 */
 	ip = mtod(m, struct ip *);
-#ifdef INET6
-	ip6 = NULL;
-#endif
 	switch (ip->ip_v) {
 #ifdef INET
 	case 4:
+#ifdef INET6
+		ip6 = NULL;
+#endif
 		af = AF_INET;
 		iphlen = sizeof(struct ip);
-		ip = mtod(m, struct ip *);
 		IP6_EXTHDR_GET(th, struct tcphdr *, m, toff,
 			sizeof(struct tcphdr));
 		if (th == NULL) {

Reply via email to