From: a bellenir Date: Thu, 21 Aug 2014 09:10:23 +0000 (+0000) Subject: rm unnecessary code X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=7226902fd8296cc9ba321d43ceb27bdce055b38d;p=projs%2Flibcds.git rm unnecessary code --- 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)