PR2083 Wrong return value in _RBTree_Has_only_one_node

The function _RBTree_Has_only_one_node shall return a boolean value, but
returns NULL. NULL, however, is defined as: (void *)0. Hence it does not match
the scalar bool type. Return false instead.
This commit is contained in:
Andreas Heinig
2012-12-18 11:27:49 -05:00
committed by Gedare Bloom
parent 4592658b70
commit 7b5513f04f

View File

@@ -221,7 +221,7 @@ RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node(
const RBTree_Control *the_rbtree
)
{
if(!the_rbtree) return NULL; /* TODO: expected behavior? */
if(!the_rbtree) return false; /* TODO: expected behavior? */
return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL);
}