summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2008-12-21 16:54:12 +0000
committertedu <tedu@openbsd.org>2008-12-21 16:54:12 +0000
commiteea53342b2bb5a288ff9ae952dcee63402c27e00 (patch)
tree7b2148f4ed0256592a4ce6eb814827ca2035cc21
parentremove mixer bits from the audio(4) backend of libsndio, it's not (diff)
downloadwireguard-openbsd-eea53342b2bb5a288ff9ae952dcee63402c27e00.tar.xz
wireguard-openbsd-eea53342b2bb5a288ff9ae952dcee63402c27e00.zip
fix example comparison function to work with large ranges of numbers. ok djm otto
-rw-r--r--share/man/man3/tree.36
1 files changed, 3 insertions, 3 deletions
diff --git a/share/man/man3/tree.3 b/share/man/man3/tree.3
index 3c91fab2c09..8472038df3f 100644
--- a/share/man/man3/tree.3
+++ b/share/man/man3/tree.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tree.3,v 1.17 2008/11/30 20:19:16 jmc Exp $
+.\" $OpenBSD: tree.3,v 1.18 2008/12/21 16:54:12 tedu Exp $
.\"/*
.\" * Copyright 2002 Niels Provos <provos@citi.umich.edu>
.\" * All rights reserved.
@@ -23,7 +23,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 $Mdocdate: November 30 2008 $
+.Dd $Mdocdate: December 21 2008 $
.Dt TREE 3
.Os
.Sh NAME
@@ -456,7 +456,7 @@ struct node {
int
intcmp(struct node *e1, struct node *e2)
{
- return (e1->i - e2->i);
+ return (e1->i < e2->i ? -1 : e1->i > e2->i);
}
RB_HEAD(inttree, node) head = RB_INITIALIZER(&head);