From owner-cvs-all Thu Dec 20 7:50:58 2001 Delivered-To: cvs-all@freebsd.org Received: from elvis.mu.org (elvis.mu.org [216.33.66.196]) by hub.freebsd.org (Postfix) with ESMTP id 5BAE037B405; Thu, 20 Dec 2001 07:50:53 -0800 (PST) Received: by elvis.mu.org (Postfix, from userid 1192) id 0CFE581E0B; Thu, 20 Dec 2001 09:50:53 -0600 (CST) Date: Thu, 20 Dec 2001 09:50:53 -0600 From: Alfred Perlstein To: Bruce Evans Cc: Maxim Sobolev , Peter Wemm , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/alpha/alpha pmap.c src/sys/i386/i386 pmap.csrc/sys/ia64/ia64 pmap.c Message-ID: <20011220095053.C48837@elvis.mu.org> References: <3C21F2F1.542EE5CC@FreeBSD.org> <20011221014329.O1630-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011221014329.O1630-100000@gamplex.bde.org>; from bde@zeta.org.au on Fri, Dec 21, 2001 at 01:46:50AM +1100 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Bruce Evans [011220 08:47] wrote: > On Thu, 20 Dec 2001, Maxim Sobolev wrote: > > > > On Wed, 19 Dec 2001, Peter Wemm wrote: > > > >... > > > > Replace a bunch of: > > > > for (pv = TAILQ_FIRST(&m->md.pv_list); > > > > pv; > > > > pv = TAILQ_NEXT(pv, pv_list)) { > > > > with: > > > > TAILQ_FOREACH(pv, &m->md.pv_list, pv_list) { > > > >... > > > This is a regression IMO. Please write C programs in something > > > resembling C. > > > > Why then we have all those *_FOREACH macros in sys/queue.h? > > Opinions differ, and mine aren't quite strong enough to back out the > commit that added *_FOREACH. I agree that the FOREACH macros are semi-gross, however they really seem to clarify the code, they reduce the lines as well as make it very clear what the loop's intent is. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' http://www.morons.org/rants/gpl-harmful.php3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message