aboutsummaryrefslogtreecommitdiff
path: root/decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'decl.c')
-rw-r--r--decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/decl.c b/decl.c
index 1fc57af..40ae579 100644
--- a/decl.c
+++ b/decl.c
@@ -629,8 +629,10 @@ declaratortypes(struct scope *s, struct list *result, char **name, bool allowabs
break;
}
}
- if (t->u.func.params->type->kind == TYPEVOID && !t->u.func.params->next)
+ if (t->u.func.nparam == 1 && !t->u.func.isvararg && t->u.func.params->type->kind == TYPEVOID && !t->u.func.params->name) {
t->u.func.params = NULL;
+ t->u.func.nparam = 0;
+ }
break;
case TRPAREN:
break;