From owner-cvs-all Thu Jan 3 12:15:42 2002 Delivered-To: cvs-all@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id EC5DF37B41A; Thu, 3 Jan 2002 12:15:36 -0800 (PST) Received: (from dillon@localhost) by apollo.backplane.com (8.11.6/8.9.1) id g03KF2X72435; Thu, 3 Jan 2002 12:15:02 -0800 (PST) (envelope-from dillon) Date: Thu, 3 Jan 2002 12:15:02 -0800 (PST) From: Matthew Dillon Message-Id: <200201032015.g03KF2X72435@apollo.backplane.com> To: Julian Elischer Cc: Poul-Henning Kamp , 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 References: 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 : :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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message