commit 0914984fe8a45e5928b4f975ee7530574452f19d
parent af7c7f190ab22c8b2af33c6a308dbe71ee8d19f7
Author: Quentin Rameau <quinq@fifth.space>
Date: Tue, 21 Jun 2016 21:09:12 +0200
[cc2] fix calloc call in nextpc()
I forgot to modify the function call and to include the correct header
in previous 92ec299 commit.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git 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 @@ nextpc(void)
{
Inst *new;
- new = xcalloc(sizeof(*new)); /* TODO: create an arena */
+ new = xcalloc(1, sizeof(*new)); /* TODO: create an arena */
if (!pc) {
prog = new;