Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet make sure so is properly initialized



details:   https://anonhg.NetBSD.org/src/rev/c4fbda379b3b
branches:  trunk
changeset: 550851:c4fbda379b3b
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Aug 22 22:49:34 2003 +0000

description:
make sure so is properly initialized

diffstat:

 sys/netinet/tcp_input.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r 05c9dd1db4b2 -r c4fbda379b3b sys/netinet/tcp_input.c
--- a/sys/netinet/tcp_input.c   Fri Aug 22 22:27:07 2003 +0000
+++ b/sys/netinet/tcp_input.c   Fri Aug 22 22:49:34 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_input.c,v 1.179 2003/08/22 22:00:37 itojun Exp $   */
+/*     $NetBSD: tcp_input.c,v 1.180 2003/08/22 22:49:34 itojun Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.179 2003/08/22 22:00:37 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_input.c,v 1.180 2003/08/22 22:49:34 itojun Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -3691,8 +3691,6 @@
        m->m_data += max_linkhdr;
        m->m_len = m->m_pkthdr.len = tlen;
        if (sc->sc_tp) {
-               struct socket *so;
-
                tp = sc->sc_tp;
                if (tp->t_inpcb)
                        so = tp->t_inpcb->inp_socket;
@@ -3702,7 +3700,8 @@
 #endif
                else
                        so = NULL;
-       }
+       } else
+               so = NULL;
        m->m_pkthdr.rcvif = NULL;
        memset(mtod(m, u_char *), 0, tlen);
 



Home | Main Index | Thread Index | Old Index