From: Michael Wallner Date: Sat, 31 Oct 2015 12:37:15 +0000 (+0100) Subject: fix decl_type X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=commitdiff_plain;h=6e8b5c090b44299f82f4e748d8bf6b8bc5b66414;hp=22b4a95d8fd6525e4539f843ba5bebb9a56e89f2 fix decl_type --- 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; }