From 9846e6e48a6987b23a3110c14973329af1ac88be Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Sat, 23 Nov 2013 17:12:44 +0100 Subject: [PATCH] initialize iter properly in ast_iterator_begin; move those decls up more --- parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parser.c b/parser.c index 0ff315d..6abf744 100644 --- a/parser.c +++ b/parser.c @@ -6128,6 +6128,7 @@ static void ast_iterator_begin(ast_iterator *iter, ast_node *start) { iter->head = start; iter->at = &iter->head; + iter->path = NULL; vec_push(iter->path, iter->at); } @@ -6160,10 +6161,10 @@ static ast_node* ast_iterator_next(ast_iterator *iter) static void traverse_that_thing(ast_function *fun) { #if 1 + ast_node *at; + size_t depth; ast_iterator iter; ast_iterator_begin(&iter, (ast_node*)fun); - ast_node *at; - size_t depth; for (at = (ast_node*)fun; at; -- 2.39.2