--- a/test/test_list.c Sat Dec 04 17:38:23 2021 +0100 +++ b/test/test_list.c Mon Dec 20 11:17:06 2021 +0100 @@ -288,7 +288,6 @@ void *begin; void *end; - void *result; // single linked list struct node third = {NULL}; @@ -296,23 +295,17 @@ struct node first = {&second}; begin = &first; - result = cx_linked_list_remove(&begin, NULL, -1, loc, &second); - CU_ASSERT_PTR_EQUAL(result, &first) + cx_linked_list_remove(&begin, NULL, -1, loc, &second); CU_ASSERT_PTR_EQUAL(begin, &first) CU_ASSERT_PTR_EQUAL(first.next, &third) - CU_ASSERT_PTR_NULL(second.next) CU_ASSERT_PTR_NULL(third.next) - result = cx_linked_list_remove(&begin, NULL, -1, loc, &first); - CU_ASSERT_PTR_EQUAL(result, &third) + cx_linked_list_remove(&begin, NULL, -1, loc, &first); CU_ASSERT_PTR_EQUAL(begin, &third) - CU_ASSERT_PTR_NULL(first.next) CU_ASSERT_PTR_NULL(third.next) - result = cx_linked_list_remove(&begin, NULL, -1, loc, &third); - CU_ASSERT_PTR_NULL(result) + cx_linked_list_remove(&begin, NULL, -1, loc, &third); CU_ASSERT_PTR_NULL(begin) - CU_ASSERT_PTR_NULL(third.next) // doubly linked list struct dnode dthird = {NULL , NULL}; @@ -323,32 +316,23 @@ begin = &dfirst; end = &dthird; - result = cx_linked_list_remove(&begin, &end, ploc, loc, &dsecond); - CU_ASSERT_PTR_EQUAL(result, &dfirst) + cx_linked_list_remove(&begin, &end, ploc, loc, &dsecond); CU_ASSERT_PTR_EQUAL(begin, &dfirst) CU_ASSERT_PTR_EQUAL(end, &dthird) CU_ASSERT_PTR_NULL(dfirst.prev) CU_ASSERT_PTR_EQUAL(dfirst.next, &dthird) - CU_ASSERT_PTR_NULL(dsecond.prev) - CU_ASSERT_PTR_NULL(dsecond.next) CU_ASSERT_PTR_EQUAL(dthird.prev, &dfirst) CU_ASSERT_PTR_NULL(dthird.next) - result = cx_linked_list_remove(&begin, &end, ploc, loc, &dthird); - CU_ASSERT_PTR_EQUAL(result, &dfirst) + cx_linked_list_remove(&begin, &end, ploc, loc, &dthird); CU_ASSERT_PTR_EQUAL(begin, &dfirst) CU_ASSERT_PTR_EQUAL(end, &dfirst) CU_ASSERT_PTR_NULL(dfirst.prev) CU_ASSERT_PTR_NULL(dfirst.next) - CU_ASSERT_PTR_NULL(dthird.prev) - CU_ASSERT_PTR_NULL(dthird.next) - result = cx_linked_list_remove(&begin, &end, ploc, loc, &dfirst); - CU_ASSERT_PTR_NULL(result) + cx_linked_list_remove(&begin, &end, ploc, loc, &dfirst); CU_ASSERT_PTR_NULL(begin) CU_ASSERT_PTR_NULL(end) - CU_ASSERT_PTR_NULL(dfirst.next) - CU_ASSERT_PTR_NULL(dfirst.prev) } void test_linked_list_size(void) {