]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: list: add a macro to detect that a list contains at most one element
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Apr 2024 16:21:50 +0000 (18:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 27 Apr 2024 07:36:36 +0000 (09:36 +0200)
commit1db3a390bb5797b0d9d99e295aa68244d5419eb9
tree85630706db6ebb167915e4cd9c1c68da7f41267b
parentbc236ad13301d82f5a4aefcd006618744a3ee7e7
MINOR: list: add a macro to detect that a list contains at most one element

The new LIST_ATMOST1() test verifies that the designated element is either
alone or points on both sides to the same element. This is used to detect
that a list has at most a single element, or that an element about to be
deleted was the last one of a list.
include/haproxy/list.h