From owner-freebsd-hackers Thu Aug 12 17:55: 8 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 6A96B1562D for ; Thu, 12 Aug 1999 17:55:04 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.1) with ESMTP id RAA16643; Thu, 12 Aug 1999 17:53:16 -0700 (PDT) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id RAA31887; Thu, 12 Aug 1999 17:53:16 -0700 (PDT) (envelope-from jdp@polstra.com) Date: Thu, 12 Aug 1999 17:53:16 -0700 (PDT) Message-Id: <199908130053.RAA31887@vashon.polstra.com> To: doconnor@gsoft.com.au Subject: Re: STAILQ macros.. In-Reply-To: Organization: Polstra & Co., Seattle, WA Cc: hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Daniel O'Connor wrote: > I am looking at the STAILQ macros defined in and I am > curious why it is necessary to declare stqh_last in the STAILQ_HEAD > as a pointer to pointer, rather than just a pointer? (like the head > pointer) When the list is empty, stqh_last points at stqh_first (which means it must be a pointer to pointer). That way, STAILQ_INSERT_TAIL doesn't have to treat an empty list as a special case. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "No matter how cynical I get, I just can't keep up." -- Nora Ephron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message