From 7226902fd8296cc9ba321d43ceb27bdce055b38d Mon Sep 17 00:00:00 2001 From: a bellenir Date: Thu, 21 Aug 2014 09:10:23 +0000 Subject: [PATCH] rm unnecessary code --- source/list/list.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/source/list/list.c b/source/list/list.c index c965b38..7beba4c 100644 --- a/source/list/list.c +++ b/source/list/list.c @@ -35,14 +35,7 @@ list_node_t* list_back( list_t* list ) size_t list_size(list_t* list) { - size_t length = 0; - list_node_t* node = list->head; - while( NULL != node ) - { - node = node->next; - length++; - } - return length; + return list_index_of(list, NULL); } bool list_empty(list_t* list) -- 2.54.0