diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-09-14 21:17:53 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2012-09-14 21:17:53 +0000 |
commit | 3e0660222098dca33dde68380b3ca0242351ce79 (patch) | |
tree | 9c923f8191c691c871a9764cfcfe3137f0e3da40 /contrib/byacc/symtab.c | |
parent | 50efb19066157745be603a337c3fa6d215ffe4d8 (diff) | |
parent | 15d0187d622e8304a13d60eb9a01f6ed63bbb9dc (diff) | |
download | src-test2-3e0660222098dca33dde68380b3ca0242351ce79.tar.gz src-test2-3e0660222098dca33dde68380b3ca0242351ce79.zip |
Notes
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 1327eaffc33d..9839180936c1 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++) |