summaryrefslogtreecommitdiff
path: root/usr.bin/yacc/lr0.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-01-08 21:40:26 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-01-08 21:40:26 +0000
commitfcdfc6fc0838e70778559e8a2672400807954a08 (patch)
tree2839609f4b2d2c6fbb9eea10ba11ba5148868d46 /usr.bin/yacc/lr0.c
parent4cf6e17da76bce62dbe8369d45bf78e2c8d1c464 (diff)
Remove CALLOC, MALLOC, FREE and REALLOC macros and just call calloc(),
nalloc(), free() and realloc() directly. The macros were casting to the wrong (pre-C89) types and there is no need for them in a C89 world. OK matthew@
Diffstat (limited to 'usr.bin/yacc/lr0.c')
-rw-r--r--usr.bin/yacc/lr0.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/yacc/lr0.c b/usr.bin/yacc/lr0.c
index 75d1b7a907c..a7632093898 100644
--- a/usr.bin/yacc/lr0.c
+++ b/usr.bin/yacc/lr0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lr0.c,v 1.12 2012/03/03 19:15:00 nicm Exp $ */
+/* $OpenBSD: lr0.c,v 1.13 2014/01/08 21:40:25 millert Exp $ */
/* $NetBSD: lr0.c,v 1.4 1996/03/19 03:21:35 jtc Exp $ */
/*
@@ -159,13 +159,13 @@ append_states(void)
void
free_storage(void)
{
- FREE(shift_symbol);
- FREE(redset);
- FREE(shiftset);
- FREE(kernel_base);
- FREE(kernel_end);
- FREE(kernel_items);
- FREE(state_set);
+ free(shift_symbol);
+ free(redset);
+ free(shiftset);
+ free(kernel_base);
+ free(kernel_end);
+ free(kernel_items);
+ free(state_set);
}
@@ -271,7 +271,7 @@ initialize_states(void)
for (i = 0; start_derives[i] >= 0; ++i)
continue;
- p = (core *) MALLOC(sizeof(core) + i*sizeof(short));
+ p = (core *) malloc(sizeof(core) + i*sizeof(short));
if (p == 0) no_space();
p->next = 0;
@@ -478,8 +478,8 @@ set_derives(void)
void
free_derives(void)
{
- FREE(derives[start_symbol]);
- FREE(derives);
+ free(derives[start_symbol]);
+ free(derives);
}
#ifdef DEBUG
@@ -512,7 +512,7 @@ set_nullable(void)
int empty;
int done;
- nullable = MALLOC(nsyms);
+ nullable = malloc(nsyms);
if (nullable == 0) no_space();
memset(nullable, 0, nsyms);
@@ -556,7 +556,7 @@ set_nullable(void)
void
free_nullable(void)
{
- FREE(nullable);
+ free(nullable);
}
void