Coverity CID 1158: Add a KASSERT to appease coverity.

This commit is contained in:
christos 2006-04-15 00:01:50 +00:00
parent 4364818c59
commit 9202171a37

View File

@ -1,4 +1,4 @@
/* $NetBSD: tp_pcb.c,v 1.28 2005/12/28 09:18:46 christos Exp $ */
/* $NetBSD: tp_pcb.c,v 1.29 2006/04/15 00:01:50 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -68,7 +68,7 @@ SOFTWARE.
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: tp_pcb.c,v 1.28 2005/12/28 09:18:46 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: tp_pcb.c,v 1.29 2006/04/15 00:01:50 christos Exp $");
#include "opt_inet.h"
#include "opt_iso.h"
@ -692,8 +692,11 @@ tp_attach(struct socket *so, int protocol)
ASSERT(tpcb->tp_nlproto->nlp_afamily == tpcb->tp_domain);
/* nothing to do for iso case */
if (dom == AF_INET)
if (dom == AF_INET) {
/* tp_set_npcb sets it */
KASSERT(so->so_pcb != NULL);
sotoinpcb(so)->inp_ppcb = (caddr_t) tpcb;
}
return 0;