Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2002 00:46:45 -0800 (PST)
From:      Julian Elischer <julian@elischer.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Stephen McKay <mckay@thehub.com.au>, John Baldwin <jhb@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Julian Elischer <julian@FreeBSD.org>, Greg Lehey <grog@FreeBSD.org>
Subject:   Re: cvs commit: src/share/man/man3 queue.3 
Message-ID:  <Pine.BSF.4.21.0201030044520.22265-100000@InterJet.elischer.org>
In-Reply-To: <1540.1009996129@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help


On Wed, 2 Jan 2002, Poul-Henning Kamp wrote:

> In message <Pine.BSF.4.21.0201020933320.19204-100000@InterJet.elischer.org>, 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0201030044520.22265-100000>