diff options
| author | Roy Marples <roy@marples.name> | 2019-03-08 09:13:57 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-03-08 09:13:57 +0000 |
| commit | a65d400ac39e1475476c169ab8fa047a461a8601 (patch) | |
| tree | 6dc562a341372cce7d7c243f3494a8f7b7466407 /compat | |
| parent | cffb8a6ef30dcf768e6a912b11f8a36dcd1bb4e1 (diff) | |
| download | dhcpcd-a65d400ac39e1475476c169ab8fa047a461a8601.tar.xz | |
rbtree: sync with upstream to remove diffs
Diffstat (limited to 'compat')
| -rw-r--r-- | compat/rb.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/compat/rb.c b/compat/rb.c index 0e0a2cf5..ed643e7b 100644 --- a/compat/rb.c +++ b/compat/rb.c @@ -1,4 +1,4 @@ -/* $NetBSD: rb.c,v 1.13 2014/08/22 17:19:48 matt Exp $ */ +/* $NetBSD: rb.c,v 1.14 2019/03/08 09:14:54 roy Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -38,13 +38,20 @@ #include <stdbool.h> #ifdef RBDEBUG #define KASSERT(s) assert(s) +#define __rbt_unused #else #define KASSERT(s) do { } while (/*CONSTCOND*/ 0) +#define __rbt_unused __unused #endif -__RCSID("$NetBSD: rb.c,v 1.13 2014/08/22 17:19:48 matt Exp $"); +__RCSID("$NetBSD: rb.c,v 1.14 2019/03/08 09:14:54 roy Exp $"); #else #include <lib/libkern/libkern.h> -__KERNEL_RCSID(0, "$NetBSD: rb.c,v 1.13 2014/08/22 17:19:48 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rb.c,v 1.14 2019/03/08 09:14:54 roy Exp $"); +#ifndef DIAGNOSTIC +#define __rbt_unused __unused +#else +#define __rbt_unused +#endif #endif #ifdef _LIBC @@ -315,10 +322,9 @@ rb_tree_insert_node(struct rb_tree *rbt, void *object) * removal since rotation almost always involves the exchanging of colors * as a separate step. */ -/*ARGSUSED*/ static void -rb_tree_reparent_nodes(struct rb_tree *rbt, struct rb_node *old_father, - const unsigned int which) +rb_tree_reparent_nodes(__rbt_unused struct rb_tree *rbt, + struct rb_node *old_father, const unsigned int which) { const unsigned int other = which ^ RB_DIR_OTHER; struct rb_node * const grandpa = RB_FATHER(old_father); @@ -326,10 +332,6 @@ rb_tree_reparent_nodes(struct rb_tree *rbt, struct rb_node *old_father, struct rb_node * const new_father = old_child; struct rb_node * const new_child = old_father; -#if !defined(_KERNEL) && !defined(_STANDALONE) && !defined(RBDEBUG) - UNUSED(rbt); -#endif - KASSERT(which == RB_DIR_LEFT || which == RB_DIR_RIGHT); KASSERT(!RB_SENTINEL_P(old_child)); |
