From owner-svn-src-stable-7@FreeBSD.ORG Wed Feb 25 14:48:13 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D08E106564A; Wed, 25 Feb 2009 14:48:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3B68FC15; Wed, 25 Feb 2009 14:48:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1PEmD9R099899; Wed, 25 Feb 2009 14:48:13 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1PEmD0r099898; Wed, 25 Feb 2009 14:48:13 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200902251448.n1PEmD0r099898@svn.freebsd.org> From: Robert Watson Date: Wed, 25 Feb 2009 14:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189042 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netatalk X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Feb 2009 14:48:14 -0000 Author: rwatson Date: Wed Feb 25 14:48:13 2009 New Revision: 189042 URL: http://svn.freebsd.org/changeset/base/189042 Log: Merge 3188124 from head to stable/7: 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 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netatalk/ddp_usrreq.c Modified: stable/7/sys/netatalk/ddp_usrreq.c ============================================================================== --- stable/7/sys/netatalk/ddp_usrreq.c Wed Feb 25 14:26:16 2009 (r189041) +++ stable/7/sys/netatalk/ddp_usrreq.c Wed Feb 25 14:48:13 2009 (r189042) @@ -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);