diff --git a/share/man/man3/queue.3 b/share/man/man3/queue.3 index 3e1a8062ef5f..256c0679e6b7 100644 --- a/share/man/man3/queue.3 +++ b/share/man/man3/queue.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: queue.3,v 1.38 2008/05/02 18:11:05 martin Exp $ +.\" $NetBSD: queue.3,v 1.39 2008/10/07 13:03:50 apb Exp $ .\" .\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ .\" .\" @(#)queue.3 8.1 (Berkeley) 12/13/93 .\" -.Dd December 11, 2007 +.Dd October 7, 2008 .Dt QUEUE 3 .Os .Sh NAME @@ -1171,6 +1171,12 @@ while (CIRCLEQ_FIRST(\*[Am]head) != (void *)\*[Am]head) if (CIRCLEQ_EMPTY(\*[Am]head)) /* Test for emptiness. */ printf("nothing to do\\n"); .Ed +.Sh NOTES +Some of these macros or functions perform no error checking, +and invalid usage leads to undefined behaviour. +In the case of macros or functions that expect their arguments +to be elements that are present in the list or queue, passing an element +that is not present is invalid. .Sh HISTORY The .Nm queue diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3 index b78df99aa191..99bbf28b99a6 100644 --- a/share/man/man3/tree.3 +++ b/share/man/man3/tree.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: tree.3,v 1.3 2004/04/14 11:05:19 pooka Exp $ +.\" $NetBSD: tree.3,v 1.4 2008/10/07 13:03:50 apb Exp $ .\" $OpenBSD: tree.3,v 1.9 2003/05/20 09:13:38 jmc Exp $ .\"/* .\" * Copyright 2002 Niels Provos @@ -29,7 +29,7 @@ .\" * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" */ -.Dd February 24, 2002 +.Dd October 7, 2008 .Dt TREE 3 .Os .Sh NAME @@ -416,6 +416,12 @@ The .Fn RB_EMPTY macro should be used to check whether a red-black tree is empty. .Sh NOTES +Some of these macros or functions perform no error checking, +and invalid usage leads to undefined behaviour. +In the case of macros or functions that expect their arguments +to be elements that are present in the tree, passing an element +that is not present in the tree is invalid. +.Pp Trying to free a tree in the following way is a common error: .Bd -literal -offset indent SPLAY_FOREACH(var, NAME, head) {