From 8f5e02b184ea447e77b4e7334fe75fbee54ca8e7 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 3 Jun 2011 10:16:59 -0400 Subject: [PATCH] rbtree: Use malloc/free directly in test Signed-off-by: Mathieu Desnoyers --- tests/test_urcu_rbtree.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/test_urcu_rbtree.c b/tests/test_urcu_rbtree.c index ac6425f..a15045b 100644 --- a/tests/test_urcu_rbtree.c +++ b/tests/test_urcu_rbtree.c @@ -71,17 +71,6 @@ static inline pid_t gettid(void) #include #include -/* TODO: error handling testing for -ENOMEM */ -void *rbtree_alloc(size_t size) -{ - return malloc(size); -} - -void rbtree_free(void *ptr) -{ - free(ptr); -} - int tree_comp(void *a, void *b) { if ((unsigned long)a < (unsigned long)b) @@ -92,7 +81,7 @@ int tree_comp(void *a, void *b) return 0; } -static DEFINE_RCU_RBTREE(rbtree, tree_comp, rbtree_alloc, rbtree_free); +static DEFINE_RCU_RBTREE(rbtree, tree_comp, malloc, free); static volatile int test_go, test_stop; -- 2.34.1