[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#8576) Broken LDAP_TAILQ_ macros
Full_Name: Howard Chu
Version: HEAD etc
OS:
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (195.235.15.200)
Submitted by: hyc
In commit 8ee824832844c16d4199f3aacd8b1d613933a7d5 we have "LDAP_TAILQ fix" but
no explanation of what was broken. In particular though, the LDAP_TAILQ_PREV
macro is now broken. It checks for foo == LDAP_TAILQ_FIRST(head) which becomes
foo == (head)->tqh_first but the initializer actually used foo =
&(head).tqh_first so this comparison will always be false.
I don't see any clear reason why these were changed from the originals. I'm
inclined to revert the change. Reverting will affect a few uses of
LDAP_TAILQ_LAST in back-ldap and back-meta but the other affected macros appear
to be unused in our source tree.
Tripped over this while attempting to use LDAP_TAILQ_PREV in new code.