ref: 75e4d370040c4a766e97c3663d92aac9ee0dce1e
parent: 581acbbb228e5dd612a5bd5e8dc74b22c69d758e
author: Quentin Rameau <quinq@fifth.space>
date: Tue Jun 21 17:09:12 EDT 2016
[cc2] fix calloc call in nextpc() I forgot to modify the function call and to include the correct header in previous 92ec299 commit.
--- a/cc2/code.c
+++ b/cc2/code.c
@@ -1,6 +1,7 @@
/* See LICENSE file for copyright and license details. */
#include <stdlib.h>
+#include "../inc/cc.h"
#include "arch.h"
#include "cc2.h"
@@ -11,7 +12,7 @@
{
Inst *new;
- new = xcalloc(sizeof(*new)); /* TODO: create an arena */
+ new = xcalloc(1, sizeof(*new)); /* TODO: create an arena */
if (!pc) {
prog = new;