From f6b94d7b7551f895280768c8ae30aee522fe0cfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Felipe=20Melchor?= Date: Wed, 5 Oct 2016 23:00:06 +0200 Subject: [PATCH] changed r_list_length to use list->length --- libr/util/list.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libr/util/list.c b/libr/util/list.c index fa7761a293..b36aab620f 100644 --- a/libr/util/list.c +++ b/libr/util/list.c @@ -49,13 +49,7 @@ R_API void r_list_init(RList *list) { } R_API int r_list_length(const RList *list) { - int count = 0; - RListIter *iter = r_list_iterator (list); - while (iter) { - count++; - iter = iter->n; - } - return count; + return list->length; } /* remove all elements of a list */