summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/types.c b/types.c
index f50bebd..f181f30 100644
--- a/types.c
+++ b/types.c
@@ -3732,7 +3732,7 @@ top:
r->expr.type = tr->fn->ret_type;
}
} else {
- if (!type_is_void(&tr->fn->ret_type) || tr->fn->ret_decls) {
+ if (!type_is_void(&tr->fn->ret_type) && !tr->fn->ret_decls) {
err_print(s->where, "No return value in non-void function.");
return false;
}