summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Provos <provos@cvs.openbsd.org>2002-06-11 19:02:51 +0000
committerNiels Provos <provos@cvs.openbsd.org>2002-06-11 19:02:51 +0000
commite7478c049fc780b84e5d9267b380f93757391a22 (patch)
treed524c26ea1ac86ec796cfc1a97e7ccfb33bdd2ea
parent1d63876b2a081e96f8b82792d5cfe5dac37eb667 (diff)
document return values
-rw-r--r--share/man/man3/tree.319
1 files changed, 18 insertions, 1 deletions
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 <provos@citi.umich.edu>
.\" * 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.