From 74766ee6bd30272d9f64d57d25b0c2f9696eb428 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 28 May 2025 12:32:28 +0200 Subject: [PATCH] include: list.h: document things that must not be done Add some warnings that list entries must not be added twice. Signed-off-by: Enrico Weigelt, metux IT consult --- include/list.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/list.h b/include/list.h index 3051d44b6..9df812075 100644 --- a/include/list.h +++ b/include/list.h @@ -95,6 +95,11 @@ * xorg_list_del(&iterator->entry); * } * + * WARNING: entries MUST NOT be added to the list twice, otherwise iterating + * will end up in infinite loop. + * WARNING: entries MUST NOT be added to multiple lists - use separate entry + * nodes within the container struct, if it needs to be added to + * several lists at the same time. */ /**