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
(from parent 1:
6cf9bd9
)
test
author
hackbard
<hackbard>
Mon, 8 Nov 2004 11:40:26 +0000
(11:40 +0000)
committer
hackbard
<hackbard>
Mon, 8 Nov 2004 11:40:26 +0000
(11:40 +0000)
list/list.c
patch
|
blob
|
history
diff --git
a/list/list.c
b/list/list.c
index
d5cf54b
..
063583c
100644
(file)
--- a/
list/list.c
+++ b/
list/list.c
@@
-153,10
+153,8
@@
int list_count(t_list *list) {
list_reset(list);
- while(list->current!=NULL) {
- list_next(list);
- ++count;
- }
+ if(list->current!=NULL) count++;
+ while(list_next(list)!=L_NO_NEXT_ELEMENT) count++;
return count;
}