From 8c6ca2d0f9b3535c4c9bd3c08048757b01dda63d Mon Sep 17 00:00:00 2001
From: hackbard <hackbard>
Date: Mon, 8 Nov 2004 11:40:26 +0000
Subject: [PATCH] test

---
 list/list.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/list/list.c b/list/list.c
index d5cf54b..063583c 100644
--- 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;
 }
-- 
2.39.5