projects
/
my-code
/
api.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c6ca2d
)
fixed list api
author
hackbard
<hackbard>
Mon, 8 Nov 2004 11:46:09 +0000
(11:46 +0000)
committer
hackbard
<hackbard>
Mon, 8 Nov 2004 11:46:09 +0000
(11:46 +0000)
list/list.c
patch
|
blob
|
history
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;
}