Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Oct 2009 07:04:08 +0000 (UTC)
From:      Lawrence Stewart <lstewart@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r197827 - projects/tcp_ffcaia2008_8.x/sys/kern
Message-ID:  <200910070704.n977481S076703@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lstewart
Date: Wed Oct  7 07:04:08 2009
New Revision: 197827
URL: http://svn.freebsd.org/changeset/base/197827

Log:
  Consistently use the local wrapearly variable in alq_doio().
  
  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	Wed Oct  7 05:38:44 2009	(r197826)
+++ projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c	Wed Oct  7 07:04:08 2009	(r197827)
@@ -300,6 +300,7 @@ alq_doio(struct alq *alq)
 	td = curthread;
 	totlen = 0;
 	iov = 1;
+	wrapearly = alq->aq_wrapearly;
 
 	bzero(&aiov, sizeof(aiov));
 	bzero(&auio, sizeof(auio));
@@ -313,7 +314,7 @@ alq_doio(struct alq *alq)
 	} 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 -
-		    alq->aq_wrapearly;
+		    wrapearly;
 	} else {
 		/*
 		 * Buffer wrapped, requires 2 aiov entries:
@@ -321,14 +322,13 @@ alq_doio(struct alq *alq)
 		 * - second is from start of buffer to writehead
 		 */
 		aiov[0].iov_len = alq->aq_buflen - alq->aq_writetail -
-		    alq->aq_wrapearly;
+		    wrapearly;
 		iov++;
 		aiov[1].iov_base = alq->aq_entbuf;
 		aiov[1].iov_len =  alq->aq_writehead;
 		totlen = aiov[0].iov_len + aiov[1].iov_len;
 	}
 
-	wrapearly = alq->aq_wrapearly;
 	alq->aq_flags |= AQ_FLUSHING;
 	ALQ_UNLOCK(alq);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910070704.n977481S076703>