summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-07-21 18:16:47 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-07-22 12:31:39 +0200
commitd7a946937807076a84a4f07b4536e3eca30727d2 (patch)
treeb9f04633117ff6ed991dc74eb9b86d57f848e283 /cpukit/score/src
parentrbtree: Format (diff)
downloadrtems-d7a946937807076a84a4f07b4536e3eca30727d2.tar.bz2
rbtree: Remove superfluous NULL pointer checks
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/rbtree.c4
-rw-r--r--cpukit/score/src/rbtreeextract.c11
-rw-r--r--cpukit/score/src/rbtreeinsert.c4
3 files changed, 0 insertions, 19 deletions
diff --git a/cpukit/score/src/rbtree.c b/cpukit/score/src/rbtree.c
index d5f758c6f9..064cc0c19f 100644
--- a/cpukit/score/src/rbtree.c
+++ b/cpukit/score/src/rbtree.c
@@ -34,10 +34,6 @@ void _RBTree_Initialize(
size_t count;
RBTree_Node *next;
- /* TODO: Error message? */
- if ( !the_rbtree )
- return;
-
/* could do sanity checks here */
_RBTree_Initialize_empty( the_rbtree );
diff --git a/cpukit/score/src/rbtreeextract.c b/cpukit/score/src/rbtreeextract.c
index e4278a4f06..0ea805bd59 100644
--- a/cpukit/score/src/rbtreeextract.c
+++ b/cpukit/score/src/rbtreeextract.c
@@ -11,7 +11,6 @@
#endif
#include <rtems/score/rbtreeimpl.h>
-#include <rtems/score/isr.h>
/** @brief Validate and fix-up tree properties after deleting a node
*
@@ -91,13 +90,6 @@ static void _RBTree_Extract_validate( RBTree_Node *the_node )
the_node->color = RBT_BLACK;
}
-/** @brief Extract a Node (unprotected)
- *
- * This routine extracts (removes) @a the_node from @a the_rbtree.
- *
- * @note It does NOT disable interrupts to ensure the atomicity
- * of the extract operation.
- */
void _RBTree_Extract(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
@@ -107,9 +99,6 @@ void _RBTree_Extract(
RBTree_Color victim_color;
RBTree_Direction dir;
- if ( !the_node )
- return;
-
/* check if min needs to be updated */
if ( the_node == the_rbtree->first[ RBT_LEFT ] ) {
RBTree_Node *next;
diff --git a/cpukit/score/src/rbtreeinsert.c b/cpukit/score/src/rbtreeinsert.c
index c77c5748bf..b31c8e7bb7 100644
--- a/cpukit/score/src/rbtreeinsert.c
+++ b/cpukit/score/src/rbtreeinsert.c
@@ -11,7 +11,6 @@
#endif
#include <rtems/score/rbtreeimpl.h>
-#include <rtems/score/isr.h>
/** @brief Validate and fix-up tree properties for a new insert/colored node
*
@@ -67,9 +66,6 @@ RBTree_Node *_RBTree_Insert(
bool is_unique
)
{
- if ( !the_node )
- return (RBTree_Node *) -1;
-
RBTree_Node *iter_node = the_rbtree->root;
if ( !iter_node ) { /* special case: first node inserted */