diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 index 08d442db5e78..7e3727b2c365 100644 --- a/share/man/man3/tree.3 +++ b/share/man/man3/tree.3 @@ -523,10 +523,25 @@ The and .Fn RB_NFIND macros can be used to find a particular element in the tree. +.Pp +The +.Fn RB_FIND +macro returns the element in the tree equal to the provided +key, or +.Dv NULL +if there is no such element. +.Pp +The +.Fn RB_NFIND +macro returns the least element greater than or equal to the provided +key, or +.Dv NULL +if there is no such element. .Bd -literal -offset indent -struct TYPE find, *res; +struct TYPE find, *res, *resn; find.key = 30; res = RB_FIND(NAME, head, &find); +resn = RB_NFIND(NAME, head, &find); .Ed .Pp The