Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/gen Fix rb_tree_iterate to get the min/max e...
details: https://anonhg.NetBSD.org/src/rev/393573e8595b
branches: trunk
changeset: 754442:393573e8595b
user: joerg <joerg%NetBSD.org@localhost>
date: Fri Apr 30 13:58:09 2010 +0000
description:
Fix rb_tree_iterate to get the min/max element of the tree for the
RBSMALL case.
diffstat:
common/lib/libc/gen/rb.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (31 lines):
diff -r 2483173f588e -r 393573e8595b common/lib/libc/gen/rb.c
--- a/common/lib/libc/gen/rb.c Fri Apr 30 13:49:22 2010 +0000
+++ b/common/lib/libc/gen/rb.c Fri Apr 30 13:58:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rb.c,v 1.5 2010/04/28 17:23:33 joerg Exp $ */
+/* $NetBSD: rb.c,v 1.6 2010/04/30 13:58:09 joerg Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -950,8 +950,8 @@
self = rbt->rbt_root;
if (RB_SENTINEL_P(self))
return NULL;
- while (!RB_SENTINEL_P(self->rb_nodes[other]))
- self = self->rb_nodes[other];
+ while (!RB_SENTINEL_P(self->rb_nodes[direction]))
+ self = self->rb_nodes[direction];
return self;
#endif /* !RBSMALL */
}
@@ -997,8 +997,8 @@
self = rbt->rbt_root;
if (RB_SENTINEL_P(self))
return NULL;
- while (!RB_SENTINEL_P(self->rb_nodes[other]))
- self = self->rb_nodes[other];
+ while (!RB_SENTINEL_P(self->rb_nodes[direction]))
+ self = self->rb_nodes[direction];
return self;
#endif /* !RBSMALL */
}
Home |
Main Index |
Thread Index |
Old Index