Module Name: src
Committed By: joerg
Date: Fri Apr 30 13:58:09 UTC 2010
Modified Files:
src/common/lib/libc/gen: rb.c
Log Message:
Fix rb_tree_iterate to get the min/max element of the tree for the
RBSMALL case.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/common/lib/libc/gen/rb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/lib/libc/gen/rb.c
diff -u src/common/lib/libc/gen/rb.c:1.5 src/common/lib/libc/gen/rb.c:1.6
--- src/common/lib/libc/gen/rb.c:1.5 Wed Apr 28 17:23:33 2010
+++ src/common/lib/libc/gen/rb.c Fri Apr 30 13:58:09 2010
@@ -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 */
}