aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'decl.c')
-rw-r--r--decl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/decl.c b/decl.c
index a6e4e71..6d6bd84 100644
--- a/decl.c
+++ b/decl.c
@@ -471,9 +471,8 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs
*p = mkparam(tok.lit, NULL);
p = &(*p)->next;
next();
- if (tok.kind != TCOMMA)
+ if (!consume(TCOMMA))
break;
- next();
} while (tok.kind == TIDENT);
break;
}
@@ -483,12 +482,10 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs
for (;;) {
*p = parameter(s);
p = &(*p)->next;
- if (tok.kind != TCOMMA)
+ if (!consume(TCOMMA))
break;
- next();
- if (tok.kind == TELLIPSIS) {
+ if (consume(TELLIPSIS)) {
t->func.isvararg = true;
- next();
break;
}
}