diff options
Diffstat (limited to 'contrib/byacc/symtab.c')
-rw-r--r-- | contrib/byacc/symtab.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/byacc/symtab.c b/contrib/byacc/symtab.c index 1327eaf..9839180 100644 --- a/contrib/byacc/symtab.c +++ b/contrib/byacc/symtab.c @@ -1,4 +1,4 @@ -/* $Id: symtab.c,v 1.9 2010/11/24 15:12:29 tom Exp $ */ +/* $Id: symtab.c,v 1.10 2012/05/26 15:16:12 tom Exp $ */ #include "defs.h" @@ -33,13 +33,13 @@ make_bucket(const char *name) assert(name != 0); - bp = (bucket *)MALLOC(sizeof(bucket)); + bp = TMALLOC(bucket, 1); NO_SPACE(bp); bp->link = 0; bp->next = 0; - bp->name = MALLOC(strlen(name) + 1); + bp->name = TMALLOC(char, strlen(name) + 1); NO_SPACE(bp->name); bp->tag = 0; @@ -82,7 +82,7 @@ create_symbol_table(void) int i; bucket *bp; - symbol_table = (bucket **)MALLOC(TABLE_SIZE * sizeof(bucket *)); + symbol_table = TMALLOC(bucket *, TABLE_SIZE); NO_SPACE(symbol_table); for (i = 0; i < TABLE_SIZE; i++) |