diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-10-06 18:20:16 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-10-06 18:20:16 +0000 |
commit | dfec4035ddaa10861d83a795848731d7a792f09b (patch) | |
tree | a07954fa6097819213356f13efc11156a41680e4 /amiga/tree.c | |
parent | 2808d77089a34eb3bdf98b6a7a71ebc7df9c5fac (diff) | |
download | netsurf-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-x | amiga/tree.c | 9 |
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) |