From e7478c049fc780b84e5d9267b380f93757391a22 Mon Sep 17 00:00:00 2001 From: Niels Provos Date: Tue, 11 Jun 2002 19:02:51 +0000 Subject: document return values --- share/man/man3/tree.3 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'share/man/man3') diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 index 897a405444b..60b5d1b7d57 100644 --- a/share/man/man3/tree.3 +++ b/share/man/man3/tree.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tree.3,v 1.5 2002/04/22 16:41:54 provos Exp $ +.\" $OpenBSD: tree.3,v 1.6 2002/06/11 19:02:50 provos Exp $ .\"/* .\" * Copyright 2002 Niels Provos .\" * All rights reserved. @@ -432,5 +432,22 @@ for (var = SPLAY_MIN(NAME, head); var != NULL; var = nxt) { free(var); } .Ed +.Pp +Both +.Fn RB_INSERT +and +.Fn SPLAY_INSERT +return +.Va NULL +if the element was inserted in the tree successfully, otherwise they +return a pointer to the element with the colliding key. +.Pp +Accordingly, +.Fn RB_REMOVE +and +.Fn SPLAY_REMOVE +return the pointer to the removed element otherwise they return +.Va NULL +to indicate an error. .Sh AUTHORS The author of the tree macros is Niels Provos. -- cgit v1.2.3