Date: Wed, 4 Feb 2009 20:04:33 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r188124 - head/sys/netatalk Message-ID: <200902042004.n14K4Xix089742@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rwatson Date: Wed Feb 4 20:04:32 2009 New Revision: 188124 URL: http://svn.freebsd.org/changeset/base/188124 Log: 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 Modified: head/sys/netatalk/ddp_usrreq.c Modified: head/sys/netatalk/ddp_usrreq.c ============================================================================== --- head/sys/netatalk/ddp_usrreq.c Wed Feb 4 20:00:17 2009 (r188123) +++ head/sys/netatalk/ddp_usrreq.c Wed Feb 4 20:04:32 2009 (r188124) @@ -75,11 +75,9 @@ static struct ifqueue atintrq1, atintrq2 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902042004.n14K4Xix089742>