projects
/
my-code
/
api.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fixed list api
[my-code/api.git]
/
list
/
list.c
diff --git
a/list/list.c
b/list/list.c
index
063583c
..
a64997f
100644
(file)
--- a/
list/list.c
+++ b/
list/list.c
@@
-154,7
+154,7
@@
int list_count(t_list *list) {
list_reset(list);
if(list->current!=NULL) count++;
- while(list_next(list)!=L_NO_NEXT_ELEMENT) count++;
+
if(count)
while(list_next(list)!=L_NO_NEXT_ELEMENT) count++;
return count;
}