Fix ILIST_DEBUG build
authorAndres Freund <andres@anarazel.de>
Wed, 18 Jan 2023 18:22:37 +0000 (10:22 -0800)
committerAndres Freund <andres@anarazel.de>
Wed, 18 Jan 2023 18:26:15 +0000 (10:26 -0800)
commit2b16208753770318085b1201a6d101cab2697132
tree4d29411377e91c64e930a86f8484dcd772e35c79
parent47bb9db75996232ea71fc1e1888ffb0e70579b54
Fix ILIST_DEBUG build

In c8ad4d8166a dlist_member_check()'s arguments were made const. Unfortunately
the implementation of dlist_member_check() used dlist_foreach(), which
currently doesn't work for const lists.

As a workaround, open-code the list iteration. The other check functions
already do so.

Discussion: https://postgr.es/m/20230118182214.co7dp4oahiunwg57@awork3.anarazel.de
src/backend/lib/ilist.c