summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/lib/ilist.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/lib/ilist.c b/src/backend/lib/ilist.c
index f06febd6985..aeb7f75cd0c 100644
--- a/src/backend/lib/ilist.c
+++ b/src/backend/lib/ilist.c
@@ -59,11 +59,12 @@ slist_delete(slist_head *head, const slist_node *node)
void
dlist_member_check(const dlist_head *head, const dlist_node *node)
{
- dlist_iter iter;
+ const dlist_node *cur;
- dlist_foreach(iter, head)
+ /* iteration open-coded to due to the use of const */
+ for (cur = head->head.next; cur != &head->head; cur = cur->next)
{
- if (iter.cur == node)
+ if (cur == node)
return;
}
elog(ERROR, "double linked list member check failure");