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