fix decl_type
authorMichael Wallner <mike@php.net>
Sat, 31 Oct 2015 12:37:15 +0000 (13:37 +0100)
committerMichael Wallner <mike@php.net>
Sat, 31 Oct 2015 12:37:15 +0000 (13:37 +0100)
src/parser.h

index a39d15ecdd0255f72713f12fbfeea0fe80312ba0..62f5e31eb0bb2f79bedb4d94540ba9e309cc368c 100644 (file)
@@ -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;
 }