commit 7bf478df16373b91bbfe2881c1008ec3e174c708
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Mon Jan 11 22:10:49 2016 +0100
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Mon Jan 11 22:10:49 2016 +0100
Simplify conditional in ansifun()
diff --git a/cc1/decl.c b/cc1/decl.c
index 2858c9d..7032733 100644
--- a/cc1/decl.c
+++ b/cc1/decl.c
@@ -243,9 +243,8 @@ ansifun(Type *tp, Type *types[], Symbol *syms[], int
*ntypes, int *nsyms)
int toomany = 0, toovoid = 0;
do {
- if (n == -1) {
- if (!toovoid)
- errorp("'void' must be the only parameter");
+ if (n == -1 && !toovoid) {
+ errorp("'void' must be the only parameter");
toovoid = 1;
}
if (accept(ELLIPSIS)) {