commit 7bf478df16373b91bbfe2881c1008ec3e174c708
parent 50340afa8a166091644dc72230dabff7a132ac11
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Mon, 11 Jan 2016 22:10:49 +0100
Simplify conditional in ansifun()
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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)) {