From f08a6678da1b796003a6f146b246c8f69f5c9ade Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 21 Jul 2004 23:33:46 +0000 Subject: [PATCH] Changed a while loop to a for --- src/ls.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ls.c b/src/ls.c index da662a0..c5e543a 100644 --- a/src/ls.c +++ b/src/ls.c @@ -134,11 +134,8 @@ static void slist_apply(SList * slist, int (*func)(void *, void *), void * user) { SListCell * slc = *slist; - while(slc != NULL) - { + for(slc = *slist; slc != NULL; slc = slc->next) func(slc->data, user); - slc = slc->next; - } } static int slist_insert_sorted(SList * slist, void * data,