In article <[EMAIL PROTECTED]>,
Daniel O'Connor <[EMAIL PROTECTED]> wrote:
> I am looking at the STAILQ macros defined in <sys/queue.h> 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 [EMAIL PROTECTED]
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message