1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

Remove local variable 'ddp' from DDP's attach and detach routines; they

were used only for assertions, and rather than ifdef'ing them
INVARIANTS and using local variables, just directly access so_pcb.

Submitted by:	Christoph Mallon <christoph dot mallon at gmx dot de>
MFC after:	1 week
This commit is contained in:
Robert Watson 2009-02-04 20:04:32 +00:00
parent fd4f1ebdfe
commit ef56900151
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=188124

View File

@ -75,11 +75,9 @@ static struct ifqueue atintrq1, atintrq2, aarpintrq;
static int
ddp_attach(struct socket *so, int proto, struct thread *td)
{
struct ddpcb *ddp;
int error = 0;
ddp = sotoddpcb(so);
KASSERT(ddp == NULL, ("ddp_attach: ddp != NULL"));
KASSERT(sotoddpcb(so) == NULL, ("ddp_attach: ddp != NULL"));
/*
* Allocate socket buffer space first so that it's present
@ -175,10 +173,8 @@ ddp_disconnect(struct socket *so)
static int
ddp_shutdown(struct socket *so)
{
struct ddpcb *ddp;
ddp = sotoddpcb(so);
KASSERT(ddp != NULL, ("ddp_shutdown: ddp == NULL"));
KASSERT(sotoddpcb(so) != NULL, ("ddp_shutdown: ddp == NULL"));
socantsendmore(so);
return (0);