From owner-svn-src-projects@FreeBSD.ORG Wed Oct 7 05:38:45 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 F244C106566B; Wed, 7 Oct 2009 05:38:44 +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 E14F38FC08; Wed, 7 Oct 2009 05:38:44 +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 n975cipk075099; Wed, 7 Oct 2009 05:38:44 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n975ciA0075097; Wed, 7 Oct 2009 05:38:44 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200910070538.n975ciA0075097@svn.freebsd.org> From: Lawrence Stewart Date: Wed, 7 Oct 2009 05:38:44 +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: r197826 - 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: Wed, 07 Oct 2009 05:38:45 -0000 Author: lstewart Date: Wed Oct 7 05:38:44 2009 New Revision: 197826 URL: http://svn.freebsd.org/changeset/base/197826 Log: Style tweaks. 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:08:26 2009 (r197825) +++ projects/tcp_ffcaia2008_8.x/sys/kern/kern_alq.c Wed Oct 7 05:38:44 2009 (r197826) @@ -257,8 +257,7 @@ alq_shutdown(struct alq *alq) * the ALQ_NOACTIVATE flag has been used), explicitly activate the * ALQ here so that the pending data gets flushed by the ald_daemon. */ - if (!(alq->aq_flags & AQ_ACTIVE) && - ALQ_HAS_PENDING_DATA(alq)) { + if (!(alq->aq_flags & AQ_ACTIVE) && ALQ_HAS_PENDING_DATA(alq)) { alq->aq_flags |= AQ_ACTIVE; ALQ_UNLOCK(alq); ALD_LOCK(); @@ -493,8 +492,8 @@ alq_writen(struct alq *alq, void *data, * there is not enough free space in our underlying buffer * to accept the message and the user can't wait, return. */ - if ((len > alq->aq_buflen) || - ((flags & ALQ_NOWAIT) && (alq->aq_freebytes < len))) { + if (len > alq->aq_buflen || + (flags & ALQ_NOWAIT && alq->aq_freebytes < len)) { ALQ_UNLOCK(alq); return (EWOULDBLOCK); } @@ -503,7 +502,7 @@ alq_writen(struct alq *alq, void *data, * ALQ_WAITOK or alq->aq_freebytes > len, either spin until * we have enough free bytes (former) or skip (latter). */ - while (alq->aq_freebytes < len && (alq->aq_flags & AQ_SHUTDOWN) == 0) { + while (alq->aq_freebytes < len && !(alq->aq_flags & AQ_SHUTDOWN)) { alq->aq_flags |= AQ_WANTED; msleep_spin(alq, &alq->aq_mtx, "alqwriten", 0); } @@ -556,8 +555,7 @@ alq_writen(struct alq *alq, void *data, alq->aq_freebytes -= len; - if (((alq->aq_flags & AQ_ACTIVE) == 0) && - ((flags & ALQ_NOACTIVATE) == 0)) { + if (!(alq->aq_flags & AQ_ACTIVE) && !(flags & ALQ_NOACTIVATE)) { alq->aq_flags |= AQ_ACTIVE; activate = 1; } @@ -629,8 +627,8 @@ alq_getn(struct alq *alq, int len, int f * there is not enough free contiguous space in our underlying buffer * to accept the message and the user can't wait, return. */ - if ((len > alq->aq_buflen) || - ((flags & ALQ_NOWAIT) && (contigbytes < len))) { + if (len > alq->aq_buflen || + (flags & ALQ_NOWAIT && contigbytes < len)) { ALQ_UNLOCK(alq); return (NULL); } @@ -640,7 +638,7 @@ alq_getn(struct alq *alq, int len, int f * either spin until we have enough free contiguous bytes (former) * or skip (latter). */ - while (contigbytes < len && (alq->aq_flags & AQ_SHUTDOWN) == 0) { + while (contigbytes < len && !(alq->aq_flags & AQ_SHUTDOWN)) { alq->aq_flags |= AQ_WANTED; msleep_spin(alq, &alq->aq_mtx, "alqgetn", 0); if (alq->aq_writehead <= alq->aq_writetail) @@ -679,8 +677,7 @@ alq_post(struct alq *alq, struct ale *al { int activate; - if (((alq->aq_flags & AQ_ACTIVE) == 0) && - ((flags & ALQ_NOACTIVATE) == 0)) { + if (!(alq->aq_flags & AQ_ACTIVE) && !(flags & ALQ_NOACTIVATE)) { alq->aq_flags |= AQ_ACTIVE; activate = 1; } else @@ -722,7 +719,7 @@ alq_flush(struct alq *alq) * Pull the lever iff there is data to flush and we're * not already in the middle of a flush operation. */ - if (ALQ_HAS_PENDING_DATA(alq) && (alq->aq_flags & AQ_FLUSHING) == 0) + if (ALQ_HAS_PENDING_DATA(alq) && !(alq->aq_flags & AQ_FLUSHING)) needwakeup = alq_doio(alq); ALQ_UNLOCK(alq);