]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make fr_rb_node do what it says
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 21 Apr 2021 16:25:19 +0000 (11:25 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 21 Apr 2021 18:12:20 +0000 (13:12 -0500)
src/lib/util/rb.h

index 32fec89b257f905d09cf2bfc461037beb204cbc1..9c26a2ff30723ff3940a6faa10ae302d3f69c785 100644 (file)
@@ -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