ref: bc3aafa3164bfd45470e72c71967110aae3bca61
parent: 6a95017edb145c2cccb94579a0fea96f7adc1d7e
author: Roberto E. Vargas Caballero <[email protected]>
date: Thu Dec 22 11:03:38 EST 2016
[cc1] Simplify popctx() This new version removed some indentation and does a better use of the whitespaces.
--- a/cc1/symbol.c
+++ b/cc1/symbol.c
@@ -106,23 +106,25 @@
{
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