From owner-cvs-all Thu Jan 3 1: 0:21 2002 Delivered-To: cvs-all@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id 040DD37B405; Thu, 3 Jan 2002 01:00:13 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020103090012.KHYN20122.rwcrmhc53.attbi.com@InterJet.elischer.org>; Thu, 3 Jan 2002 09:00:12 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id AAA22276; Thu, 3 Jan 2002 00:46:46 -0800 (PST) Date: Thu, 3 Jan 2002 00:46:45 -0800 (PST) From: Julian Elischer To: Poul-Henning Kamp Cc: Stephen McKay , John Baldwin , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Julian Elischer , Greg Lehey Subject: Re: cvs commit: src/share/man/man3 queue.3 In-Reply-To: <1540.1009996129@critter.freebsd.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Wed, 2 Jan 2002, Poul-Henning Kamp wrote: > In message , Ju > lian Elischer writes: > > >how about explicitly detailing that it's NULL at the end? > >Doesn't that also work? > > I don't think we should document that. > > There are types of lists/queues which doesn't naturally end with > that condition. That is why we have the FOO_EMPTY() clause, although > people tend to also rely on > > if (FOO_FIRST(...) == NULL) > /* nothing to do */ Since TAILQ_FIRST== NULL is a termination (it's empty) condition (as is TAILQ_NEXT() == NULL) it makes PERFECT sense that a completed set of iterations ends up with the pointer being NULL. Sometimes I reckon you are bloody minded just for the sheer fun of it.. > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message