Date: Thu, 3 Jan 2002 12:15:02 -0800 (PST) From: Matthew Dillon <dillon@apollo.backplane.com> To: Julian Elischer <julian@elischer.org> Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, 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: <200201032015.g03KF2X72435@apollo.backplane.com> References: <Pine.BSF.4.21.0201030138380.22265-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
: :I don't understand your point.. :TAILQ_FIRST() does not do a conditional to give a NULL on empty.. :...#define TAILQ_FIRST(head) ((head)->tqh_first) My example wasn't meant to be compatible with sys/queue.h, but if you look at sys/queue.h you will find that CIRCLEQ_FIRST() does not return NULL on an empty list, nor does CIRCLEQ_NEXT(). You have to use CIRCLEQ_EMPTY() to test for an empty lilst and you pretty much have to use CIRCLEQ_FOREACH() to iterate over a list. -Matt Matthew Dillon <dillon@backplane.com> 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?200201032015.g03KF2X72435>