From 81d177d59f36f11ceebc09b662d7d2a43644bb41 Mon Sep 17 00:00:00 2001 From: bms Date: Sun, 10 Nov 2013 19:49:18 +0000 Subject: [PATCH] RB_FOREACH_[REVERSE_]FROM() do not require the head pointer. Reword. --- share/man/man3/tree.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 index 380d5cd6a38e..2e9c63cf751e 100644 --- a/share/man/man3/tree.3 +++ b/share/man/man3/tree.3 @@ -139,10 +139,10 @@ .Ft "struct TYPE *" .Fn RB_PARENT "struct TYPE *elm" "RB_ENTRY NAME" .Fn RB_FOREACH VARNAME NAME "RB_HEAD *head" -.Fn RB_FOREACH_FROM "VARNAME" "NAME" "RB_HEAD *head" "POS_VARNAME" +.Fn RB_FOREACH_FROM "VARNAME" "NAME" "POS_VARNAME" .Fn RB_FOREACH_SAFE "VARNAME" "NAME" "RB_HEAD *head" "TEMP_VARNAME" .Fn RB_FOREACH_REVERSE VARNAME NAME "RB_HEAD *head" -.Fn RB_FOREACH_REVERSE_FROM "VARNAME" "NAME" "RB_HEAD *head" "POS_VARNAME" +.Fn RB_FOREACH_REVERSE_FROM "VARNAME" "NAME" "POS_VARNAME" .Fn RB_FOREACH_REVERSE_SAFE "VARNAME" "NAME" "RB_HEAD *head" "TEMP_VARNAME" .Ft void .Fn RB_INIT "RB_HEAD *head" @@ -480,7 +480,9 @@ and .Fn RB_FOREACH_REVERSE_FROM may be used to continue an interrupted traversal in a forward or reverse direction respectively. -The resume point should be passed as their last argument, +The head pointer is not required. +The pointer to the node from where to resume the traversal +should be passed as their last argument, and will be overwritten to provide safe traversal. .Pp The