summaryrefslogtreecommitdiff
path: root/decls_cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'decls_cgen.c')
-rw-r--r--decls_cgen.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/decls_cgen.c b/decls_cgen.c
index 61c93e8..2c6fc63 100644
--- a/decls_cgen.c
+++ b/decls_cgen.c
@@ -15,12 +15,7 @@ static bool cgen_decls_type(CGenerator *g, Type *type) {
if (!(sdef->flags & STRUCT_DEF_CGEN_DEFINED)) {
/* generate struct definition */
cgen_write(g, "struct ");
- if (sdef->name) {
- cgen_ident(g, sdef->name);
- } else {
- assert(sdef->c.id);
- cgen_ident_id(g, sdef->c.id);
- }
+ cgen_struct_name(g, sdef);
cgen_write(g, "{");
cgen_nl(g);
++g->indent_lvl;