Module Name:    src
Committed By:   joerg
Date:           Wed Apr 28 17:23:33 UTC 2010

Modified Files:
        src/common/lib/libc/gen: rb.c

Log Message:
Fix warnings for -DRBSMALL


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 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.4 src/common/lib/libc/gen/rb.c:1.5
--- src/common/lib/libc/gen/rb.c:1.4	Tue May 19 22:48:19 2009
+++ src/common/lib/libc/gen/rb.c	Wed Apr 28 17:23:33 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: rb.c,v 1.4 2009/05/19 22:48:19 yamt Exp $ */
+/* $NetBSD: rb.c,v 1.5 2010/04/28 17:23:33 joerg Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -472,7 +472,9 @@
 {
 	const unsigned int which = RB_POSITION(self);
 	struct rb_node *father = RB_FATHER(self);
+#ifndef RBSMALL
 	const bool was_root = RB_ROOT_P(rbt, self);
+#endif
 
 	KASSERT(rebalance || (RB_ROOT_P(rbt, self) || RB_RED_P(self)));
 	KASSERT(!rebalance || RB_BLACK_P(self));
@@ -676,7 +678,9 @@
 {
 	struct rb_node *father = RB_FATHER(self);
 	struct rb_node *son = self->rb_nodes[which];
+#ifndef RBSMALL
 	const bool was_root = RB_ROOT_P(rbt, self);
+#endif
 
 	KASSERT(which == RB_DIR_LEFT || which == RB_DIR_RIGHT);
 	KASSERT(RB_BLACK_P(self) && RB_RED_P(son));

Reply via email to