diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-08-02 20:37:16 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:01:00 -0700 |
| commit | bdfb7140eaa2700fd3f9db4b46bb3fb9a5d537f7 (patch) | |
| tree | f4722c40b145cb596e3fe3a18c3f32113831b4a3 /scope.c | |
| parent | 09ff8b4f71fe3013ec9086261ef02715be139492 (diff) | |
| download | sparse-dev-bdfb7140eaa2700fd3f9db4b46bb3fb9a5d537f7.tar.gz | |
More conversion from "iterate()" to an explicit FOR_EACH_PTR()
loop.
In particular, this cleans up the compound statement return
type handling a lot. It's just a lot more obvious with the
straigth loop, and no indirection through an iterator function.
Diffstat (limited to 'scope.c')
| -rw-r--r-- | scope.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -45,7 +45,7 @@ void start_function_scope(void) start_scope(&block_scope); } -static void remove_symbol_scope(struct symbol *sym, void *data, int flags) +static void remove_symbol_scope(struct symbol *sym) { struct symbol **ptr = sym->id_list; @@ -58,10 +58,13 @@ static void end_scope(struct scope **s) { struct scope *scope = *s; struct symbol_list *symbols = scope->symbols; + struct symbol *sym; *s = scope->next; scope->symbols = NULL; - symbol_iterate(symbols, remove_symbol_scope, NULL); + FOR_EACH_PTR(symbols, sym) { + remove_symbol_scope(sym); + } END_FOR_EACH_PTR; } void end_symbol_scope(void) |
