Make it compile without options DIAGNOSTIC by removing a variable only set

once and only tested once in an assert.
This commit is contained in:
martin 2014-05-19 15:44:04 +00:00
parent 7e88065a92
commit e2e67479c9
2 changed files with 6 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: rfcomm_socket.c,v 1.13 2014/05/19 02:51:24 rmind Exp $ */
/* $NetBSD: rfcomm_socket.c,v 1.14 2014/05/19 15:44:04 martin Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.13 2014/05/19 02:51:24 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: rfcomm_socket.c,v 1.14 2014/05/19 15:44:04 martin Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@ -119,9 +119,7 @@ rfcomm_attach1(struct socket *so, int proto)
static void
rfcomm_detach1(struct socket *so)
{
struct rfcomm_dlc *pcb = so->so_pcb;
KASSERT(pcb != NULL);
KASSERT(so->so_pcb != NULL);
rfcomm_detach((struct rfcomm_dlc **)&so->so_pcb);
KASSERT(so->so_pcb == NULL);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sco_socket.c,v 1.14 2014/05/19 02:51:24 rmind Exp $ */
/* $NetBSD: sco_socket.c,v 1.15 2014/05/19 15:44:04 martin Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.14 2014/05/19 02:51:24 rmind Exp $");
__KERNEL_RCSID(0, "$NetBSD: sco_socket.c,v 1.15 2014/05/19 15:44:04 martin Exp $");
/* load symbolic names */
#ifdef BLUETOOTH_DEBUG
@ -102,9 +102,7 @@ sco_attach1(struct socket *so, int proto)
static void
sco_detach1(struct socket *so)
{
struct sco_pcb *pcb = (struct sco_pcb *)so->so_pcb;
KASSERT(pcb != NULL);
KASSERT(so->so_pcb != NULL);
sco_detach((struct sco_pcb **)&so->so_pcb);
KASSERT(so->so_pcb == NULL);
}