From 6e8b5c090b44299f82f4e748d8bf6b8bc5b66414 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sat, 31 Oct 2015 13:37:15 +0100 Subject: [PATCH] fix decl_type --- src/parser.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/parser.h b/src/parser.h index a39d15e..62f5e31 100644 --- a/src/parser.h +++ b/src/parser.h @@ -29,10 +29,9 @@ typedef struct decl_type { } decl_type; static inline decl_type *init_decl_type(token_t type, char *name) { - decl_type *t = malloc(sizeof(*t)); + decl_type *t = calloc(1, sizeof(*t)); t->type = type; t->name = strdup(name); - t->real = NULL; return t; } -- 2.30.2