aboutsummaryrefslogtreecommitdiffstats
path: root/man3/queue.3
diff options
context:
space:
mode:
authorAlejandro Colomar <colomar.6.4.3@gmail.com>2020-08-12 09:43:11 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2020-08-13 09:27:07 +0200
commit1d2e2ecda745ea2bbf0a341f3c1112e00d8e32dc (patch)
tree45395776e7250c09b2b1658073870d6e7a9d2110 /man3/queue.3
parentcc863b39dd91743efb3887df5f9de7b7025990af (diff)
downloadman-pages-1d2e2ecda745ea2bbf0a341f3c1112e00d8e32dc.tar.gz
queue.3: Remove wrong code from example
There was code containing ``CIRCLEQ_*`` in the examples for ``TAILQ_*``. It was introduced by accident in commit ``041abbe``. From 0c9dfbe9b1ce1130e9a92d1a16fbecd4a08bbe29 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar <colomar.6.4.3@gmail.com> Date: Wed, 12 Aug 2020 09:11:27 +0200 Subject: [PATCH] queue.3: Remove wrong code from example Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3/queue.3')
-rw-r--r--man3/queue.312
1 files changed, 0 insertions, 12 deletions
diff --git a/man3/queue.3 b/man3/queue.3
index ff1f42f3a9..260a5b8a5e 100644
--- a/man3/queue.3
+++ b/man3/queue.3
@@ -1219,18 +1219,6 @@ while (n1 != NULL) {
}
TAILQ_INIT(&head);
-n2 = malloc(sizeof(struct entry)); /* Insert before. */
-CIRCLEQ_INSERT_BEFORE(&head, n1, n2, entries);
- /* Forward traversal. */
-for (np = head.cqh_first; np != (void *)&head;
- np = np\->entries.cqe_next)
- np\-> ...
- /* Reverse traversal. */
-for (np = head.cqh_last; np != (void *)&head; np = np\->entries.cqe_prev)
- np\-> ...
- /* Delete. */
-while (head.cqh_first != (void *)&head)
- CIRCLEQ_REMOVE(&head, head.cqh_first, entries);
.Ed
.Sh CONFORMING TO
Not in POSIX.1, POSIX.1-2001 or POSIX.1-2008.