From: Arran Cudbard-Bell Date: Wed, 21 Apr 2021 16:25:19 +0000 (-0500) Subject: Make fr_rb_node do what it says X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5514ca1c3e0cac2c8b8595ff70801f1e908d39;p=thirdparty%2Ffreeradius-server.git Make fr_rb_node do what it says --- diff --git a/src/lib/util/rb.h b/src/lib/util/rb.h index 32fec89b257..9c26a2ff307 100644 --- a/src/lib/util/rb.h +++ b/src/lib/util/rb.h @@ -305,9 +305,9 @@ uint32_t fr_rb_num_elements(fr_rb_tree_t *tree) CC_HINT(nonnull); * - true if node is in the tree. * - talse if node is not in the tree. */ -static inline bool fr_rb_node_inline_in_tree(fr_rb_node_t *node) +static inline bool fr_rb_node_inline_in_tree(fr_rb_node_t const *node) { - return ((!node->left && !node->right && !node->parent) || (node->being_freed)); + return (node->left && node->right && node->parent && !node->being_freed); } /** Check to see if nodes are equivalent and if they are, replace one with the other