]> git.mdlowis.com Git - projs/libcds.git/commitdiff
rm unnecessary code
authora bellenir <a@bellenir.com>
Thu, 21 Aug 2014 09:10:23 +0000 (09:10 +0000)
committera bellenir <a@bellenir.com>
Thu, 21 Aug 2014 09:10:23 +0000 (09:10 +0000)
source/list/list.c

index c965b382c5d1194a56a9411e4f40eebdab3f231b..7beba4c5a1e898367d71eeece97575175d77e39b 100644 (file)
@@ -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)