From owner-svn-src-projects@FreeBSD.ORG Tue Oct 6 17:33:01 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 665DB106568D; Tue, 6 Oct 2009 17:33:01 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 55D138FC25; Tue, 6 Oct 2009 17:33:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n96HX0Tx053578; Tue, 6 Oct 2009 17:33:00 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n96HX03o053574; Tue, 6 Oct 2009 17:33:00 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200910061733.n96HX03o053574@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 6 Oct 2009 17:33:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197809 - projects/tcp_ffcaia2008_8.x/sys/kern X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Oct 2009 17:33:01 -0000 Author: lstewart Date: Tue Oct 6 17:33:00 2009 New Revision: 197809 URL: http://svn.freebsd.org/changeset/base/197809 Log: Remove a superfluous semi-colon and fix an accounting bug in alq_doio(). The special case where the buffer had wrapped early but no bytes had been subsequently written (i.e. alq->aq_writehead == 0 && alq->aq_wrapearly > 0) was not handled correctly. Sponsored by: FreeBSD Foundation Modified: projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c Modified: projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c ============================================================================== --- projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c Tue Oct 6 17:14:39 2009 (r197808) +++ projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c Tue Oct 6 17:33:00 2009 (r197809) @@ -313,7 +313,8 @@ alq_doio(struct alq *alq) totlen = aiov[0].iov_len = alq->aq_writehead - alq->aq_writetail; } else if (alq->aq_writehead == 0) { /* Buffer not wrapped (special case to avoid an empty iov). */ - totlen = aiov[0].iov_len = alq->aq_buflen - alq->aq_writetail;; + totlen = aiov[0].iov_len = alq->aq_buflen - alq->aq_writetail - + alq->aq_wrapearly; } else { /* * Buffer wrapped, requires 2 aiov entries: