diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-02-04 20:04:32 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-02-04 20:04:32 +0000 |
commit | 9390c99f96b4ef278e947cd9c9cf6e3b989eaf10 (patch) | |
tree | bd1b149051f872a615d68d417c17f41fbb675020 /sys/netatalk | |
parent | d686641019f32152ca123434c7ba5aa85c4e50ab (diff) | |
download | FreeBSD-src-9390c99f96b4ef278e947cd9c9cf6e3b989eaf10.zip FreeBSD-src-9390c99f96b4ef278e947cd9c9cf6e3b989eaf10.tar.gz |
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
Diffstat (limited to 'sys/netatalk')
-rw-r--r-- | sys/netatalk/ddp_usrreq.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c index 3db88cf..7ea8f4f 100644 --- a/sys/netatalk/ddp_usrreq.c +++ b/sys/netatalk/ddp_usrreq.c @@ -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); |