commit 55c925535846f926611e070fe5bd417dc9ac326c parent f5dfae1b97d7ec07b2db1f30576d6b9fe93abdb7 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Thu, 22 Dec 2016 16:03:38 +0100 [cc1] Simplify popctx() This new version removed some indentation and does a better use of the whitespaces. Diffstat:
M | cc1/symbol.c | | | 26 | ++++++++++++++------------ |
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/cc1/symbol.c b/cc1/symbol.c @@ -106,23 +106,25 @@ popctx(void) { Symbol *next, *sym; - if (--curctx == GLOBALCTX) { - for (sym = labels; sym; sym = next) { - next = sym->next; - killsym(sym); - } - labels = NULL; - if (curfun) { - free(curfun->u.pars); - curfun->u.pars = NULL; - } - } - for (sym = head; sym && sym->ctx > curctx; sym = next) { next = sym->next; killsym(sym); } head = sym; + + if (--curctx != GLOBALCTX) + return; + + for (sym = labels; sym; sym = next) { + next = sym->next; + killsym(sym); + } + labels = NULL; + + if (curfun) { + free(curfun->u.pars); + curfun->u.pars = NULL; + } } unsigned