From: Jordan Date: Wed, 11 Jan 2017 22:59:42 +0000 (-0800) Subject: fixes X-Git-Url: https://www.kengrimes.com/gitweb/?p=henge%2Fapc.git;a=commitdiff_plain;h=544e32bc02944d6a51f4eedebc796e90bbe0386d fixes --- diff --git a/src/ir.c b/src/ir.c index 4255f22..5fbd52e 100644 --- a/src/ir.c +++ b/src/ir.c @@ -23,6 +23,7 @@ void ir_quit(void); int ir_linker(void); int ir_condenser(void); /* Private */ +struct pagenode_t; extern //apc.c long sys_pagesize; static inline @@ -34,7 +35,6 @@ int bytes_identical(uint8_t*,uint8_t*); static void* stack_alloc(size_t); /* Memory allocator */ -struct pagenode_t; struct pagenode_t { struct pagenode_t* next; char* head; @@ -124,7 +124,7 @@ struct ir_class_t root_class = { .name = (uint8_t*)"." }; /* Init */ int ir_init ( void ) -{ pagenode_root = (struct pagenode_t*) calloc(PN_ALLOCSIZE); +{ pagenode_root = (struct pagenode_t*) calloc((size_t)PN_ALLOCSIZE,1); if (pagenode_root == NULL) return -1; pagenode_root->head = pagenode_root->root;