aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--decl.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/decl.c b/decl.c
index 9b56262..d6514a9 100644
--- a/decl.c
+++ b/decl.c
@@ -486,9 +486,7 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs
*p = mkparam(tok.lit, NULL, QUALNONE);
p = &(*p)->next;
next();
- if (!consume(TCOMMA))
- break;
- } while (tok.kind == TIDENT);
+ } while (consume(TCOMMA) && tok.kind == TIDENT);
break;
}
/* fallthrough */
@@ -517,12 +515,8 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs
case TLBRACK: /* array declarator */
next();
tq = QUALNONE;
- for (;;) {
- if (tok.kind == TSTATIC)
- next(); /* ignore */
- else if (!typequal(&tq))
- break;
- }
+ while (consume(TSTATIC) || typequal(&tq))
+ ;
if (tok.kind == TMUL)
error(&tok.loc, "VLAs are not yet supported");
if (tok.kind == TRBRACK) {