changed r_list_length to use list->length

This commit is contained in:
Álvaro Felipe Melchor 2016-10-05 23:00:06 +02:00
parent e00123d259
commit f6b94d7b75

View File

@ -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 */