Date: Thu, 20 Dec 2001 13:38:43 -0800 From: Peter Wemm <peter@wemm.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: Bruce Evans <bde@zeta.org.au>, cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/alpha/alpha pmap.c src/sys/i386/i386 pmap.c src/sys/ia64/ia64 pmap.c Message-ID: <20011220213843.AD35039F0@overcee.netplex.com.au> In-Reply-To: <667.1008876572@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote: > In message <20011221005726.Q884-100000@gamplex.bde.org>, Bruce Evans writes: > >On Wed, 19 Dec 2001, Peter Wemm wrote: > > > >> peter 2001/12/19 21:29:59 PST > >> > >> Modified files: > >> sys/alpha/alpha pmap.c > >> sys/i386/i386 pmap.c > >> sys/ia64/ia64 pmap.c > >> Log: > >> 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) { > >> > >> Revision Changes Path > >> 1.79 +9 -28 src/sys/alpha/alpha/pmap.c > >> 1.301 +6 -20 src/sys/i386/i386/pmap.c > >> 1.41 +10 -30 src/sys/ia64/ia64/pmap.c > > > >This is a regression IMO. Please write C programs in something > >resembling C. > > This is an improvement IMO. Please use whatever means we have to > improve readability of our source code. Well, the indentation was messed up beforehand, so fixing it required touching it. I actually like these particular ones because it helps distinguish the standard iterator loops from those that modify the items and have to preload the 'next' value. eg: for (pv = TAILQ_FIRST(&m->md.pv_list); pv; pv = npv) { npv = TAILQ_NEXT(pv, pv_list); do_stuff(); } Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011220213843.AD35039F0>