summaryrefslogtreecommitdiff
path: root/amiga/tree.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2008-10-06 18:20:16 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2008-10-06 18:20:16 +0000
commitdfec4035ddaa10861d83a795848731d7a792f09b (patch)
treea07954fa6097819213356f13efc11156a41680e4 /amiga/tree.c
parent2808d77089a34eb3bdf98b6a7a71ebc7df9c5fac (diff)
downloadnetsurf-dfec4035ddaa10861d83a795848731d7a792f09b.tar.gz
netsurf-dfec4035ddaa10861d83a795848731d7a792f09b.tar.bz2
List traversing tidy-up.
svn path=/trunk/netsurf/; revision=5499
Diffstat (limited to 'amiga/tree.c')
-rwxr-xr-xamiga/tree.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/amiga/tree.c b/amiga/tree.c
index 230467ffc..b88444a91 100755
--- a/amiga/tree.c
+++ b/amiga/tree.c
@@ -290,13 +290,14 @@ void free_browserlist(struct List *list)
if(IsListEmpty(list)) return;
- node = list->lh_Head;
- while (nextnode = node->ln_Succ)
+ node = GetHead(list);
+
+ do
{
+ nextnode = GetSucc(node);
FreeVec(node->ln_Name);
FreeListBrowserNode(node);
- node = nextnode;
- }
+ } while(node = nextnode);
}
void ami_add_elements(struct treeview_window *twin,struct node *root,WORD *gen)