From 7b5513f04fa4aee88936cd6cd3c3fc5e0fc4e8f2 Mon Sep 17 00:00:00 2001 From: Andreas Heinig Date: Tue, 18 Dec 2012 11:27:49 -0500 Subject: 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. --- cpukit/score/inline/rtems/score/rbtree.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/score/inline/rtems/score') diff --git a/cpukit/score/inline/rtems/score/rbtree.inl b/cpukit/score/inline/rtems/score/rbtree.inl index c5187a02ae..439b40a0ba 100644 --- a/cpukit/score/inline/rtems/score/rbtree.inl +++ b/cpukit/score/inline/rtems/score/rbtree.inl @@ -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); } -- cgit v1.2.3