diff options
Diffstat (limited to 'lib/typerb.c')
| -rw-r--r-- | lib/typerb.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/typerb.c b/lib/typerb.c index 151d91ce20..e1346df191 100644 --- a/lib/typerb.c +++ b/lib/typerb.c @@ -480,3 +480,11 @@ struct rb_entry *typed_rb_min(const struct rbt_tree *rbt) return parent; } + +bool typed_rb_member(const struct typed_rb_root *rbt, + const struct typed_rb_entry *rbe) +{ + while (rbe->rbt_parent) + rbe = rbe->rbt_parent; + return rbe == rbt->rbt_root; +} |
