diff mbox series

[21/22] list.3: BUGS: Note LIST_FOREACH() limitations

Message ID 20201020142146.61837-22-colomar.6.4.3@gmail.com
State Not Applicable
Headers show
Series list.3: New page forked from queue.3 | expand

Commit Message

Alejandro Colomar Oct. 20, 2020, 2:21 p.m. UTC
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
 man3/list.3 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series


diff --git a/man3/list.3 b/man3/list.3
index bb64fff92..4aec14cc8 100644
--- a/man3/list.3
+++ b/man3/list.3
@@ -261,6 +261,20 @@  Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008.
 Present on the BSDs
 (LIST macros first appeared in 4.4BSD).
+The macro
+doesn't allow
+.I var
+to be removed or freed within the loop,
+as it would interfere with the traversal.
+The macro
+which is not present in glibc,
+solves this bug by
+allowing to both remove
+.I var
+as well as free it from within the loop safely
+without interfering with the traversal.
 #include <stddef.h>