BUG/MEDIUM: lists: Handle 1-element-lists in MT_LIST_BEHEAD().
authorOlivier Houchard <ohouchard@haproxy.com>
Thu, 17 Oct 2019 15:46:01 +0000 (17:46 +0200)
committerOlivier Houchard <cognet@ci0.org>
Thu, 17 Oct 2019 15:48:20 +0000 (17:48 +0200)
commit2068ec4f89af0bb1f8540ddd162e3c762ccebd89
treef3d704dbfe34ad98d743bf5a0eedff3b8fbaa6b8
parentba0c53ef71cd7d2b344de318742d0ef239fd34e4
BUG/MEDIUM: lists: Handle 1-element-lists in MT_LIST_BEHEAD().

In MT_LIST_BEHEAD(), explicitely set the next element of the prev to NULL,
instead of setting it to the prev of the next. If we only had one element,
then we'd set the next and the prev to the element itself, and thus it would
make the element appear to be outside any list.
include/common/mini-clist.h